|
| 1 | +/*eslint-env node*/ |
| 2 | +module.exports = { |
| 3 | + root: true, |
| 4 | + env: { |
| 5 | + browser: true, |
| 6 | + es2020: true, |
| 7 | + }, |
| 8 | + extends: [ |
| 9 | + 'eslint:recommended', |
| 10 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 11 | + 'plugin:@typescript-eslint/recommended', |
| 12 | + 'plugin:react/recommended', |
| 13 | + 'plugin:import/errors', |
| 14 | + 'plugin:import/warnings', |
| 15 | + 'plugin:prettier/recommended', |
| 16 | + 'prettier', |
| 17 | + ], |
| 18 | + parser: '@typescript-eslint/parser', |
| 19 | + parserOptions: { |
| 20 | + ecmaFeatures: { |
| 21 | + jsx: true, |
| 22 | + }, |
| 23 | + ecmaVersion: 2020, |
| 24 | + sourceType: 'module', |
| 25 | + }, |
| 26 | + plugins: ['@typescript-eslint', 'react', 'import'], |
| 27 | + settings: { |
| 28 | + 'import/resolver': { |
| 29 | + node: { |
| 30 | + extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], |
| 31 | + moduleDirectory: ['node_modules/'], |
| 32 | + }, |
| 33 | + typescript: { |
| 34 | + config: 'tsconfig.json', |
| 35 | + alwaysTryTypes: true, |
| 36 | + }, |
| 37 | + }, |
| 38 | + react: { |
| 39 | + version: 'detect', |
| 40 | + }, |
| 41 | + }, |
| 42 | + rules: { |
| 43 | + '@typescript-eslint/ban-types': [ |
| 44 | + 'error', |
| 45 | + { |
| 46 | + types: { |
| 47 | + '{}': false, |
| 48 | + }, |
| 49 | + }, |
| 50 | + ], |
| 51 | + 'react/prop-types': ['off'], |
| 52 | + 'react/react-in-jsx-scope': 'off', |
| 53 | + 'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }], |
| 54 | + 'import/order': ['error'], |
| 55 | + 'no-unused-vars': 'off', |
| 56 | + '@typescript-eslint/no-unused-vars': ['error'], |
| 57 | + 'prettier/prettier': [ |
| 58 | + 'error', |
| 59 | + { |
| 60 | + trailingComma: 'all', |
| 61 | + endOfLine: 'lf', |
| 62 | + semi: true, |
| 63 | + singleQuote: true, |
| 64 | + printWidth: 162, |
| 65 | + tabWidth: 2, |
| 66 | + }, |
| 67 | + ], |
| 68 | + }, |
| 69 | +}; |
0 commit comments