|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + browser: true, |
| 5 | + node: true, |
| 6 | + es2023: true, |
| 7 | + }, |
| 8 | + parser: '@typescript-eslint/parser', |
| 9 | + plugins: [ |
| 10 | + '@typescript-eslint', |
| 11 | + 'sonarjs', |
| 12 | + ], |
| 13 | + extends: [ |
| 14 | + 'airbnb', |
| 15 | + 'plugin:react/jsx-runtime', |
| 16 | + 'plugin:sonarjs/recommended', |
| 17 | + 'plugin:import/typescript', |
| 18 | + ], |
| 19 | + settings: { |
| 20 | + 'import/core-modules': ['electron'], |
| 21 | + 'import/resolver': { |
| 22 | + typescript: {}, |
| 23 | + node: { |
| 24 | + extensions: ['.ts', '.tsx', '.js', '.jsx'], |
| 25 | + }, |
| 26 | + }, |
| 27 | + }, |
| 28 | + rules: { |
| 29 | + 'max-len': ['error', { code: 120 }], |
| 30 | + complexity: ['error', { max: 10 }], |
| 31 | + semi: ['error', 'never'], |
| 32 | + 'no-confusing-arrow': ['off'], |
| 33 | + 'no-restricted-syntax': ['off'], |
| 34 | + 'no-unused-vars': ['off'], |
| 35 | + '@typescript-eslint/no-unused-vars': ['error'], |
| 36 | + 'no-nested-ternary': ['off'], |
| 37 | + |
| 38 | + 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], |
| 39 | + 'react/require-default-props': ['off'], |
| 40 | + 'jsx-a11y/click-events-have-key-events': ['off'], |
| 41 | + 'jsx-a11y/interactive-supports-focus': ['off'], |
| 42 | + |
| 43 | + 'import/extensions': ['error', { |
| 44 | + js: 'never', |
| 45 | + jsx: 'never', |
| 46 | + ts: 'never', |
| 47 | + tsx: 'never', |
| 48 | + json: 'always', |
| 49 | + }], |
| 50 | + 'import/no-extraneous-dependencies': ['error', { |
| 51 | + devDependencies: [ |
| 52 | + '**/*.test.js', |
| 53 | + '**/*.spec.js', |
| 54 | + 'build/**/*', |
| 55 | + './*.js', |
| 56 | + './*.ts', |
| 57 | + ], |
| 58 | + }], |
| 59 | + 'import/prefer-default-export': ['off'], |
| 60 | + }, |
| 61 | +} |
0 commit comments