This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
-
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
3df780c
commit baf1776
Showing
3 changed files
with
6,632 additions
and
7,498 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 |
---|---|---|
@@ -1,67 +1,59 @@ | ||
module.exports = { | ||
plugins: ['react-hooks', 'jsx-a11y', '@typescript-eslint'], | ||
extends: [ | ||
'5app', | ||
'plugin:react/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
env: { | ||
browser: true, | ||
jest: true, | ||
}, | ||
rules: { | ||
'no-unused-vars': ['error', {ignoreRestSiblings: true}], | ||
'no-console': ['error', {allow: ['error', 'warn']}], | ||
'prefer-template': 'off', | ||
'react/jsx-no-bind': [ | ||
'error', | ||
{allowArrowFunctions: true, ignoreRefs: true}, | ||
], | ||
'react/prop-types': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
|
||
// turning off now for JS to enable easier migration | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
|
||
// you must disable the base rule as it can report incorrect errors. | ||
// https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined/64024916#64024916 | ||
'no-use-before-define': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
rules: { | ||
// we want to warn or error on these rules as this is the direction we want | ||
// go for new TS files. | ||
'@typescript-eslint/explicit-module-boundary-types': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-var-requires': 'error', | ||
'@typescript-eslint/no-empty-function': 'error', | ||
|
||
// you must disable the base rule as it can report incorrect errors | ||
// more info here: | ||
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
}, | ||
}, | ||
], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
}; | ||
plugins: ['react-hooks', 'jsx-a11y', '@typescript-eslint'], | ||
extends: ["5app", "plugin:react/recommended", "plugin:jsx-a11y/recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:storybook/recommended"], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true | ||
} | ||
}, | ||
env: { | ||
browser: true, | ||
jest: true | ||
}, | ||
rules: { | ||
'no-unused-vars': ['error', { | ||
ignoreRestSiblings: true | ||
}], | ||
'no-console': ['error', { | ||
allow: ['error', 'warn'] | ||
}], | ||
'prefer-template': 'off', | ||
'react/jsx-no-bind': ['error', { | ||
allowArrowFunctions: true, | ||
ignoreRefs: true | ||
}], | ||
'react/prop-types': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
// turning off now for JS to enable easier migration | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
// you must disable the base rule as it can report incorrect errors. | ||
// https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined/64024916#64024916 | ||
'no-use-before-define': 'off' | ||
}, | ||
overrides: [{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
rules: { | ||
// we want to warn or error on these rules as this is the direction we want | ||
// go for new TS files. | ||
'@typescript-eslint/explicit-module-boundary-types': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-var-requires': 'error', | ||
'@typescript-eslint/no-empty-function': 'error', | ||
// you must disable the base rule as it can report incorrect errors | ||
// more info here: | ||
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'error' | ||
} | ||
}], | ||
settings: { | ||
react: { | ||
version: 'detect' | ||
} | ||
} | ||
}; |
Oops, something went wrong.