|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es2020: true, |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + 'plugin:react/recommended', |
| 8 | + 'airbnb', |
| 9 | + 'plugin:prettier/recommended', |
| 10 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 11 | + 'plugin:@typescript-eslint/recommended', |
| 12 | + ], |
| 13 | + parser: '@typescript-eslint/parser', |
| 14 | + parserOptions: { |
| 15 | + ecmaFeatures: { |
| 16 | + jsx: true, |
| 17 | + }, |
| 18 | + ecmaVersion: 11, |
| 19 | + sourceType: 'module', |
| 20 | + }, |
| 21 | + plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'], |
| 22 | + settings: { |
| 23 | + 'import/resolver': { |
| 24 | + node: { |
| 25 | + extensions: ['.js', '.ts', '.tsx'], |
| 26 | + }, |
| 27 | + }, |
| 28 | + }, |
| 29 | + rules: { |
| 30 | + 'react-hooks/rules-of-hooks': 'error', |
| 31 | + 'react-hooks/exhaustive-deps': 'error', |
| 32 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 33 | + 'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }], |
| 34 | + 'react/prop-types': 'off', |
| 35 | + 'react/jsx-one-expression-per-line': 'off', |
| 36 | + 'import/extensions': ['error', 'never'], |
| 37 | + 'import/prefer-default-export': 'off', |
| 38 | + 'import/no-unresolved': ['error', { ignore: ['react-hooks-fetch'] }], |
| 39 | + camelcase: [ |
| 40 | + 'error', |
| 41 | + { |
| 42 | + properties: 'never', |
| 43 | + ignoreDestructuring: false, |
| 44 | + allow: ['first_name'], |
| 45 | + }, |
| 46 | + ], |
| 47 | + 'react/state-in-constructor': 'off', |
| 48 | + 'no-console': 'off', |
| 49 | + }, |
| 50 | +}; |
0 commit comments