-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
305 additions
and
171 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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import pluginJs from '@eslint/js'; | ||
import tseslint from '@typescript-eslint/eslint-plugin'; | ||
import parser from '@typescript-eslint/parser'; | ||
import pluginImport from 'eslint-plugin-import'; | ||
import pluginJsxA11y from 'eslint-plugin-jsx-a11y'; | ||
import pluginReact from 'eslint-plugin-react'; | ||
import pluginReactHooks from 'eslint-plugin-react-hooks'; | ||
import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort'; | ||
import globals from 'globals'; | ||
|
||
const commonRules = { | ||
...pluginJs.configs.recommended.rules, | ||
...tseslint.configs.recommended.rules, | ||
...pluginReact.configs.recommended.rules, | ||
...pluginImport.configs.rules, | ||
...pluginReactHooks.configs.recommended.rules, | ||
...pluginJsxA11y.configs.recommended.rules, | ||
'react/jsx-uses-react': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'import/no-unresolved': 'off', | ||
'react/prop-types': 'off', | ||
'import/no-named-as-default': 'off', | ||
'import/no-named-as-default-member': 'off', | ||
'jsx-a11y/label-has-associated-control': 'off', | ||
eqeqeq: 'error', | ||
'no-undef': 'off', | ||
'no-unused-vars': 'off', | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
}; | ||
|
||
export default [ | ||
{ | ||
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'], | ||
languageOptions: { | ||
globals: globals.browser, | ||
parser: parser, | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: 'module', | ||
}, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
plugins: { | ||
'@typescript-eslint': tseslint, | ||
react: pluginReact, | ||
'react-hooks': pluginReactHooks, | ||
import: pluginImport, | ||
'jsx-a11y': pluginJsxA11y, | ||
'simple-import-sort': pluginSimpleImportSort, | ||
}, | ||
rules: { | ||
...commonRules, | ||
}, | ||
}, | ||
//! ts override (지우면 ts와 충돌) | ||
{ | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
parser: parser, | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: 'module', | ||
project: ['./tsconfig.json'], | ||
}, | ||
}, | ||
rules: { | ||
...commonRules, | ||
//TODO: 추후 제거 예정 (변경 시 현재 동작에 영향이 가는 것을 고려해야함) | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'error', | ||
{ | ||
prefer: 'type-imports', | ||
disallowTypeAnnotations: false, | ||
}, | ||
], | ||
'padding-line-between-statements': [ | ||
'error', | ||
{ blankLine: 'always', prev: '*', next: 'return' }, | ||
], | ||
}, | ||
}, | ||
]; |
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.