99 lines
3.1 KiB
JavaScript
99 lines
3.1 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es6: true,
|
|
jest: true,
|
|
},
|
|
extends: ['plugin:react/recommended', 'airbnb', 'prettier'],
|
|
globals: {
|
|
Atomics: 'readonly',
|
|
SharedArrayBuffer: 'readonly',
|
|
},
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 2018,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: [
|
|
'react',
|
|
'react-hooks',
|
|
'@typescript-eslint',
|
|
'prettier',
|
|
'unused-imports',
|
|
],
|
|
settings: {
|
|
'import/resolver': {
|
|
node: {
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
|
|
},
|
|
typescript: {},
|
|
},
|
|
},
|
|
rules: {
|
|
'import/extensions': 'off',
|
|
'react/prop-types': 'off',
|
|
'no-console': 'off',
|
|
'react/jsx-filename-extension': [
|
|
1,
|
|
{ extensions: ['.ts', '.tsx', '.jsx'] },
|
|
],
|
|
'no-shadow': 'off',
|
|
'unused-imports/no-unused-imports-ts': 2,
|
|
'import/prefer-default-export': 'off',
|
|
'react/jsx-props-no-spreading': 'off',
|
|
'jsx-a11y/control-has-associated-label': 'off',
|
|
'jsx-a11y/label-has-associated-control': 'off',
|
|
'no-unused-vars': 'off',
|
|
'jsx-a11y/no-static-element-interactions': 'off',
|
|
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
|
'jsx-a11y/label-has-associated-control': 'off',
|
|
'max-len': ['warn', { ignoreStrings: true, code: 200 }],
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
'react-hooks/exhaustive-deps': 'off',
|
|
'max-classes-per-file': 'off',
|
|
'import/no-named-default': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': ['off'],
|
|
'react/no-unescaped-entities': 0,
|
|
'react/button-has-type': 'off',
|
|
'consistent-return': 'off',
|
|
'jsx-a11y/no-static-element-interactions': 'off',
|
|
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
|
'import/no-extraneous-dependencies': [
|
|
'error',
|
|
{
|
|
devDependencies: [
|
|
'**/__tests__/**/*.+(ts|tsx|js)',
|
|
'**/webpack.*.js',
|
|
'**/commonTestUtil.tsx',
|
|
'**/src/mocks/**',
|
|
],
|
|
},
|
|
],
|
|
'react/jsx-one-expression-per-line': 'warn',
|
|
|
|
// The following @typescript-eslint rules have been identified as errors, but currently marked as warnings so that we can incrementally fix them all.
|
|
'@typescript-eslint/member-delimiter-style': 'warn',
|
|
'no-restricted-syntax': 'warn',
|
|
'@typescript-eslint/ban-types': 'warn',
|
|
'@typescript-eslint/type-annotation-spacing': 'warn',
|
|
'@typescript-eslint/no-inferrable-types': 'warn',
|
|
'@typescript-eslint/interface-name-prefix': 'warn',
|
|
'@typescript-eslint/no-empty-interface': 'warn',
|
|
'@typescript-eslint/class-name-casing': 'warn',
|
|
'@typescript-eslint/no-empty-function': 'warn',
|
|
'@typescript-eslint/camelcase': 'warn',
|
|
'@typescript-eslint/no-var-requires': 'warn',
|
|
'react/require-default-props': 'warn',
|
|
'react/no-array-index-key': 'warn',
|
|
'no-unused-expressions': 'warn',
|
|
'jsx-a11y/click-events-have-key-events': 'off',
|
|
'jsx-a11y/anchor-is-valid': 'off',
|
|
'no-param-reassign': 0,
|
|
camelcase: 'off',
|
|
'arrow-body-style': 'off',
|
|
},
|
|
};
|