-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: autoformat files before commit
Revert eslint changes when facebook/create-react-app#6513 will be merged Revert to react-scripts when facebook/create-react-app#5829 will be merged
- Loading branch information
1 parent
8281cc7
commit 36ba0dc
Showing
12 changed files
with
750 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"extends": "react-app", | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.ts", "**/*.tsx"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"warnOnUnsupportedTypeScriptVersion": true | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"camelcase": "off", | ||
"indent": "off", | ||
"no-array-constructor": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-angle-bracket-type-assertion": "warn", | ||
"@typescript-eslint/no-array-constructor": "warn", | ||
"@typescript-eslint/no-namespace": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"args": "none", | ||
"ignoreRestSiblings": true | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"singleQuote": true, | ||
"semi": false, | ||
"trailingComma": "all", | ||
"jsxBracketSameLine": true, | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = function(config) { | ||
// load eslint from file | ||
// revert on https://github.com/facebook/create-react-app/pull/6513 | ||
const eslintRule = config.module.rules[1] | ||
eslintRule.test = /\.(js|mjs|jsx|ts|tsx)$/ | ||
const eslintOptions = eslintRule.use[0].options | ||
delete eslintOptions.baseConfig | ||
delete eslintOptions.ignore | ||
delete eslintOptions.useEslintrc | ||
|
||
return config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './app.component'; | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import App from './app.component' | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div'); | ||
ReactDOM.render(<App />, div); | ||
ReactDOM.unmountComponentAtNode(div); | ||
}); | ||
const div = document.createElement('div') | ||
ReactDOM.render(<App />, div) | ||
ReactDOM.unmountComponentAtNode(div) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import './index.css'; | ||
import App from './app.component'; | ||
import * as serviceWorker from './serviceWorker'; | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import './index.css' | ||
import App from './app.component' | ||
import * as serviceWorker from './serviceWorker' | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')); | ||
ReactDOM.render(<App />, document.getElementById('root')) | ||
|
||
// If you want your app to work offline and load faster, you can change | ||
// unregister() to register() below. Note this comes with some pitfalls. | ||
// Learn more about service workers: https://bit.ly/CRA-PWA | ||
serviceWorker.unregister(); | ||
serviceWorker.unregister() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/// <reference types="react-scripts" /> | ||
/// <reference types="@winify/react-scripts" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react' | ||
|
||
import { storiesOf } from '@storybook/react' | ||
import { action } from '@storybook/addon-actions' | ||
import { linkTo } from '@storybook/addon-links' | ||
|
||
import { Button, Welcome } from '@storybook/react/demo' | ||
|
||
storiesOf('Welcome', module).add('to Storybook', () => ( | ||
<Welcome showApp={linkTo('Button')} /> | ||
)) | ||
|
||
storiesOf('Button', module) | ||
.add('with text', () => ( | ||
<Button onClick={action('clicked')}>Hello Button</Button> | ||
)) | ||
.add('with some emoji', () => ( | ||
<Button onClick={action('clicked')}> | ||
<span role="img" aria-label="so cool"> | ||
😀 😎 👍 💯 | ||
</span> | ||
</Button> | ||
)) |
Oops, something went wrong.