|
| 1 | +// @ts-check |
| 2 | +import eslint from '@eslint/js'; |
| 3 | +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; |
| 4 | +import globals from 'globals'; |
| 5 | +import tseslint from 'typescript-eslint'; |
| 6 | + |
| 7 | +export default tseslint.config( |
| 8 | + { |
| 9 | + ignores: ['eslint.config.mjs'], |
| 10 | + }, |
| 11 | + eslint.configs.recommended, |
| 12 | + ...tseslint.configs.recommendedTypeChecked, |
| 13 | + eslintPluginPrettierRecommended, |
| 14 | + { |
| 15 | + languageOptions: { |
| 16 | + globals: { |
| 17 | + ...globals.node, |
| 18 | + ...globals.jest, |
| 19 | + }, |
| 20 | + ecmaVersion: 5, |
| 21 | + sourceType: 'module', |
| 22 | + parserOptions: { |
| 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-floating-promises': 'off', |
| 32 | + '@typescript-eslint/no-unsafe-argument': 'warn', |
| 33 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 34 | + '@typescript-eslint/no-unsafe-return': 'off', |
| 35 | + '@typescript-eslint/no-unsafe-assignment': 'warn', |
| 36 | + '@typescript-eslint/no-unsafe-call': 'warn', |
| 37 | + '@typescript-eslint/no-unsafe-member-access': 'warn', |
| 38 | + '@typescript-eslint/require-await': 'warn', |
| 39 | + '@typescript-eslint/no-unused-vars': 'warn', |
| 40 | + '@typescript-eslint/unbound-method': 'warn', |
| 41 | + }, |
| 42 | + }, |
| 43 | +); |
0 commit comments