-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update packages, migrate latest eslint.
- Loading branch information
Showing
58 changed files
with
717 additions
and
641 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
module.exports = { | ||
const config = { | ||
semi: true, | ||
tabWidth: 2, | ||
useTabs: false, | ||
printWidth: 100, | ||
endOfLine: 'auto', | ||
singleQuote: true, | ||
trailingComma: 'es5', | ||
arrowParens: 'always', | ||
bracketSpacing: true, | ||
jsxSingleQuote: true, | ||
useTabs: false, | ||
printWidth: 100, | ||
endOfLine: 'auto', | ||
}; | ||
|
||
export default 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import reactPlugin from 'eslint-plugin-react'; | ||
import importPlugin from 'eslint-plugin-import'; | ||
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; | ||
import hooksPlugin from 'eslint-plugin-react-hooks'; | ||
import prettierPlugin from 'eslint-plugin-prettier'; | ||
import typescriptParser from '@typescript-eslint/parser'; | ||
import typescriptPlugin from '@typescript-eslint/eslint-plugin'; | ||
|
||
export default [ | ||
{ | ||
files: ['**/*.{js,jsx,ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
parser: typescriptParser, | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
plugins: { | ||
react: reactPlugin, | ||
import: importPlugin, | ||
prettier: prettierPlugin, | ||
'jsx-a11y': jsxA11yPlugin, | ||
'react-hooks': hooksPlugin, | ||
'@typescript-eslint': typescriptPlugin, | ||
}, | ||
rules: { | ||
...hooksPlugin.configs.recommended.rules, | ||
...jsxA11yPlugin.configs.recommended.rules, | ||
'no-console': 'warn', | ||
'react/prop-types': 'off', | ||
'prettier/prettier': 'error', | ||
'react/react-in-jsx-scope': 'off', | ||
'react/require-default-props': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'no-unused-vars': ['error', { args: 'none' }], | ||
'jsx-a11y/label-has-associated-control': 'off', | ||
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }], | ||
}, | ||
}, | ||
]; |
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,7 +1,5 @@ | ||
import React from 'react'; | ||
|
||
import Navigation from './navigation/Navigation'; | ||
|
||
const App = (): React.JSX.Element => <Navigation />; | ||
const App = (): JSX.Element => <Navigation />; | ||
|
||
export default App; |
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,10 +1,8 @@ | ||
import React from 'react'; | ||
|
||
// interfaces | ||
interface IProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const Box = ({ children }: IProps): React.JSX.Element => <div className='box'>{children}</div>; | ||
const Box = ({ children }: IProps): JSX.Element => <div className='box'>{children}</div>; | ||
|
||
export default Box; |
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
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
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
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
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
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
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
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
Oops, something went wrong.