|
| 1 | +import eslint from '@eslint/js'; |
| 2 | +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; |
| 3 | +import globals from 'globals'; |
| 4 | +import tseslint from 'typescript-eslint'; |
| 5 | + |
| 6 | +export default tseslint.config( |
| 7 | + { |
| 8 | + ignores: ['node_modules', '**/node_modules/**', '**/*.js', '**/*.d.ts'] |
| 9 | + }, |
| 10 | + eslint.configs.recommended, |
| 11 | + ...tseslint.configs.recommendedTypeChecked, |
| 12 | + eslintPluginPrettierRecommended, |
| 13 | + { |
| 14 | + languageOptions: { |
| 15 | + globals: { |
| 16 | + ...globals.node, |
| 17 | + ...globals.jest |
| 18 | + }, |
| 19 | + ecmaVersion: 5, |
| 20 | + sourceType: 'module', |
| 21 | + parserOptions: { |
| 22 | + project: ['tsconfig.json', 'tsconfig.build.json', 'tsconfig.spec.json'], |
| 23 | + projectService: true, |
| 24 | + tsconfigRootDir: import.meta.dirname |
| 25 | + } |
| 26 | + } |
| 27 | + }, |
| 28 | + { |
| 29 | + rules: { |
| 30 | + '@typescript-eslint/no-explicit-any': 'off', |
| 31 | + '@typescript-eslint/no-unsafe-assignment': 'off', |
| 32 | + '@typescript-eslint/no-unsafe-call': 'off', |
| 33 | + '@typescript-eslint/no-unsafe-member-access': 'off', |
| 34 | + '@typescript-eslint/no-unsafe-function-type': 'off', |
| 35 | + '@typescript-eslint/no-unsafe-argument': 'off', |
| 36 | + '@typescript-eslint/no-unsafe-return': 'off', |
| 37 | + '@typescript-eslint/no-unused-expressions': 'off', |
| 38 | + '@typescript-eslint/no-require-imports': 'off', |
| 39 | + '@typescript-eslint/no-unused-vars': 'off', |
| 40 | + '@typescript-eslint/no-misused-promises': [ |
| 41 | + 'error', |
| 42 | + { |
| 43 | + checksVoidReturn: false, |
| 44 | + checksConditionals: false |
| 45 | + } |
| 46 | + ], |
| 47 | + '@typescript-eslint/require-await': 'off', |
| 48 | + '@typescript-eslint/prefer-promise-reject-errors': 'off', |
| 49 | + '@typescript-eslint/no-base-to-string': 'off', |
| 50 | + '@typescript-eslint/unbound-method': 'off', |
| 51 | + '@typescript-eslint/only-throw-error': 'off' |
| 52 | + } |
| 53 | + } |
| 54 | +); |
0 commit comments