|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es6: true, |
| 5 | + node: true, |
| 6 | + }, |
| 7 | + extends: [ |
| 8 | + 'plugin:import/errors', |
| 9 | + 'plugin:import/warnings', |
| 10 | + 'plugin:import/typescript', |
| 11 | + ], |
| 12 | + parser: '@typescript-eslint/parser', |
| 13 | + parserOptions: { |
| 14 | + project: 'tsconfig.json', |
| 15 | + sourceType: 'module', |
| 16 | + }, |
| 17 | + plugins: ['@typescript-eslint', 'import'], |
| 18 | + rules: { |
| 19 | + '@typescript-eslint/adjacent-overload-signatures': 'error', |
| 20 | + '@typescript-eslint/no-empty-function': 'error', |
| 21 | + '@typescript-eslint/no-empty-interface': 'warn', |
| 22 | + '@typescript-eslint/no-floating-promises': 'error', |
| 23 | + '@typescript-eslint/no-namespace': 'error', |
| 24 | + '@typescript-eslint/no-unnecessary-type-assertion': 'error', |
| 25 | + '@typescript-eslint/prefer-for-of': 'warn', |
| 26 | + '@typescript-eslint/triple-slash-reference': 'error', |
| 27 | + '@typescript-eslint/unified-signatures': 'warn', |
| 28 | + 'comma-dangle': 'warn', |
| 29 | + 'constructor-super': 'error', |
| 30 | + eqeqeq: ['warn', 'always'], |
| 31 | + 'import/no-deprecated': 'warn', |
| 32 | + 'import/no-extraneous-dependencies': 'error', |
| 33 | + 'import/no-unassigned-import': 'warn', |
| 34 | + 'no-cond-assign': 'error', |
| 35 | + 'no-duplicate-case': 'error', |
| 36 | + 'no-duplicate-imports': 'error', |
| 37 | + 'no-empty': [ |
| 38 | + 'error', |
| 39 | + { |
| 40 | + allowEmptyCatch: true, |
| 41 | + }, |
| 42 | + ], |
| 43 | + 'no-invalid-this': 'error', |
| 44 | + 'no-new-wrappers': 'error', |
| 45 | + 'no-param-reassign': 'error', |
| 46 | + 'no-redeclare': 'error', |
| 47 | + 'no-sequences': 'error', |
| 48 | + 'no-shadow': [ |
| 49 | + 'error', |
| 50 | + { |
| 51 | + hoist: 'all', |
| 52 | + }, |
| 53 | + ], |
| 54 | + 'no-throw-literal': 'error', |
| 55 | + 'no-unsafe-finally': 'error', |
| 56 | + 'no-unused-labels': 'error', |
| 57 | + 'no-var': 'warn', |
| 58 | + 'no-void': 'error', |
| 59 | + 'prefer-const': 'warn', |
| 60 | + }, |
| 61 | + settings: { |
| 62 | + jsdoc: { |
| 63 | + tagNamePreference: { |
| 64 | + returns: 'return', |
| 65 | + }, |
| 66 | + }, |
| 67 | + }, |
| 68 | +}; |
0 commit comments