|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + browser: true, |
| 5 | + node: true, |
| 6 | + es2020: true, |
| 7 | + commonjs: true, |
| 8 | + }, |
| 9 | + parser: '@typescript-eslint/parser', |
| 10 | + parserOptions: { |
| 11 | + ecmaVersion: 2020, |
| 12 | + sourceType: 'module', |
| 13 | + ecmaFeatures: { |
| 14 | + jsx: true, |
| 15 | + }, |
| 16 | + project: './tsconfig.json', |
| 17 | + }, |
| 18 | + plugins: ['react', 'prettier', '@typescript-eslint'], |
| 19 | + extends: [ |
| 20 | + 'airbnb', |
| 21 | + 'airbnb-typescript', |
| 22 | + 'airbnb/hooks', |
| 23 | + 'plugin:@typescript-eslint/recommended', |
| 24 | + 'plugin:react/recommended', |
| 25 | + 'plugin:react-hooks/recommended', |
| 26 | + 'plugin:jsx-a11y/recommended', |
| 27 | + 'plugin:prettier/recommended', |
| 28 | + 'plugin:import/errors', |
| 29 | + 'plugin:import/warnings', |
| 30 | + 'plugin:import/typescript', |
| 31 | + 'prettier', |
| 32 | + ], |
| 33 | + rules: { |
| 34 | + 'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }], |
| 35 | + 'react/prop-types': 'off', |
| 36 | + 'react/jsx-props-no-spreading': ['error', { custom: 'ignore' }], |
| 37 | + 'react/react-in-jsx-scope': 'off', |
| 38 | + 'react/no-unescaped-entities': 'off', |
| 39 | + 'react/jsx-no-constructed-context-values': 'off', |
| 40 | + 'import/extensions': 'off', |
| 41 | + 'import/no-unresolved': 'off', |
| 42 | + 'import/prefer-default-export': 'off', |
| 43 | + 'import/no-extraneous-dependencies': 'off', |
| 44 | + 'import/no-cycle': [0, { ignoreExternal: true }], |
| 45 | + 'implicit-arrow-linebreak': 'off', |
| 46 | + 'arrow-parens': 'off', |
| 47 | + 'comma-dangle': 'off', |
| 48 | + 'global-require': 'off', |
| 49 | + 'operator-linebreak': 'off', |
| 50 | + 'no-restricted-exports': 'off', |
| 51 | + 'react/function-component-definition': 'off', |
| 52 | + 'no-use-before-define': ['error'], |
| 53 | + 'prettier/prettier': ['error', {}, { usePrettierrc: true }], |
| 54 | + 'prefer-const': ['error'], |
| 55 | + '@typescript-eslint/comma-dangle': 'off', |
| 56 | + '@typescript-eslint/semi': 'off', |
| 57 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 58 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 59 | + '@typescript-eslint/no-var-requires': 'off', |
| 60 | + '@typescript-eslint/no-unused-vars': ['error'], |
| 61 | + '@typescript-eslint/no-use-before-define': [ |
| 62 | + 'error', |
| 63 | + { functions: false, classes: false, variables: true }, |
| 64 | + ], |
| 65 | + '@typescript-eslint/no-empty-interface': [ |
| 66 | + 'error', |
| 67 | + { |
| 68 | + allowSingleExtends: true, |
| 69 | + }, |
| 70 | + ], |
| 71 | + }, |
| 72 | + settings: { |
| 73 | + react: { |
| 74 | + version: 'detect', |
| 75 | + }, |
| 76 | + }, |
| 77 | +} |
0 commit comments