-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
1267bf2
commit af80972
Showing
4 changed files
with
397 additions
and
480 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,82 @@ | ||
import eslint from '@eslint/js'; | ||
import importPlugin from 'eslint-plugin-import'; | ||
import jsxA11y from 'eslint-plugin-jsx-a11y'; | ||
import playwright from 'eslint-plugin-playwright'; | ||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
import reactPlugin from 'eslint-plugin-react'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
reactPlugin.configs.flat.recommended, | ||
reactPlugin.configs.flat['jsx-runtime'], | ||
// FIXME: Update to flat config when new update is released | ||
{ | ||
plugins: { 'react-hooks': reactHooks }, | ||
}, | ||
// eslint-disable-next-line import/no-named-as-default-member | ||
tseslint.configs.recommended, | ||
importPlugin.flatConfigs.recommended, | ||
importPlugin.flatConfigs.typescript, | ||
jsxA11y.flatConfigs.recommended, | ||
eslintPluginPrettierRecommended, | ||
playwright.configs['flat/recommended'], | ||
{ | ||
rules: { | ||
// FIXME: Remove these rules after migrating to flat config | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
'import/extensions': [ | ||
'warn', | ||
'ignorePackages', | ||
{ | ||
js: 'never', | ||
jsx: 'never', | ||
ts: 'never', | ||
tsx: 'never', | ||
}, | ||
], | ||
'import/no-unresolved': 'warn', | ||
'import/order': [ | ||
'warn', | ||
{ | ||
alphabetize: { | ||
order: 'asc', | ||
}, | ||
}, | ||
], | ||
'import/prefer-default-export': 'off', | ||
'no-param-reassign': 'off', | ||
'prefer-destructuring': [ | ||
'warn', | ||
{ | ||
array: false, | ||
object: true, | ||
}, | ||
], | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
endOfLine: 'auto', | ||
}, | ||
], | ||
'react/jsx-sort-props': 'warn', | ||
'sort-imports': [ | ||
'warn', | ||
{ | ||
ignoreDeclarationSort: true, | ||
}, | ||
], | ||
'spaced-comment': ['warn', 'always', { markers: ['/'] }], | ||
}, | ||
}, | ||
{ | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
'import/resolver': { typescript: {} }, | ||
}, | ||
}, | ||
); |
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.