|
| 1 | +module.exports = { |
| 2 | + reportUnusedDisableDirectives: true, |
| 3 | + ignorePatterns: ['examples'], |
| 4 | + parser: '@typescript-eslint/parser', |
| 5 | + extends: [ |
| 6 | + 'eslint:recommended', |
| 7 | + 'plugin:@typescript-eslint/recommended', |
| 8 | + 'standard', |
| 9 | + 'plugin:eslint-plugin/recommended', |
| 10 | + 'prettier', |
| 11 | + ], |
| 12 | + plugins: ['unicorn'], |
| 13 | + rules: { |
| 14 | + 'no-empty': 'off', |
| 15 | + 'no-console': 'error', |
| 16 | + 'no-prototype-builtins': 'off', |
| 17 | + 'no-useless-constructor': 'off', |
| 18 | + 'no-unused-vars': 'off', // disable base rule as it can report incorrect errors |
| 19 | + '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], |
| 20 | + '@typescript-eslint/no-use-before-define': 'off', |
| 21 | + '@typescript-eslint/no-namespace': 'off', |
| 22 | + '@typescript-eslint/no-empty-interface': 'off', |
| 23 | + '@typescript-eslint/no-empty-function': 'off', |
| 24 | + '@typescript-eslint/no-var-requires': 'off', |
| 25 | + '@typescript-eslint/no-explicit-any': 'off', |
| 26 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 27 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 28 | + '@typescript-eslint/ban-ts-ignore': 'off', |
| 29 | + '@typescript-eslint/ban-types': 'off', |
| 30 | + 'unicorn/prefer-array-some': 'error', |
| 31 | + 'unicorn/prefer-includes': 'error', |
| 32 | + 'eslint-plugin/test-case-shorthand-strings': 'error', |
| 33 | + }, |
| 34 | + overrides: [ |
| 35 | + { |
| 36 | + files: ['*.{spec,test}.{ts,js}'], |
| 37 | + env: { |
| 38 | + jest: true, |
| 39 | + }, |
| 40 | + }, |
| 41 | + { |
| 42 | + files: ['**/tests/mocks/*.{ts,js}'], |
| 43 | + rules: { |
| 44 | + '@typescript-eslint/no-unused-vars': 'off', |
| 45 | + }, |
| 46 | + }, |
| 47 | + ], |
| 48 | +}; |
0 commit comments