|
| 1 | +// Flat config for ESLint v9+ |
| 2 | +import tseslint from '@typescript-eslint/eslint-plugin' |
| 3 | +import tsParser from '@typescript-eslint/parser' |
| 4 | +import prettier from 'eslint-plugin-prettier' |
| 5 | + |
| 6 | +export default [ |
| 7 | + { |
| 8 | + ignores: ['dist/**', 'node_modules/**', 'coverage/**', 'artifacts/**', 'artifacts-compile/**', 'cache/**'], |
| 9 | + }, |
| 10 | + { |
| 11 | + files: ['src/**/*.{ts,js}', 'test/**/*.{ts,js}'], |
| 12 | + languageOptions: { |
| 13 | + parser: tsParser, |
| 14 | + ecmaVersion: 2022, |
| 15 | + sourceType: 'module', |
| 16 | + globals: { |
| 17 | + node: true, |
| 18 | + es2022: true, |
| 19 | + browser: true, |
| 20 | + }, |
| 21 | + }, |
| 22 | + plugins: { |
| 23 | + '@typescript-eslint': tseslint, |
| 24 | + prettier, |
| 25 | + }, |
| 26 | + rules: { |
| 27 | + ...tseslint.configs.recommended.rules, |
| 28 | + 'prettier/prettier': 'error', |
| 29 | + '@typescript-eslint/no-explicit-any': 'off', |
| 30 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 31 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 32 | + '@typescript-eslint/no-unused-vars': [ |
| 33 | + 'error', |
| 34 | + { |
| 35 | + argsIgnorePattern: '^_', |
| 36 | + varsIgnorePattern: '^_', |
| 37 | + ignoreRestSiblings: true, |
| 38 | + }, |
| 39 | + ], |
| 40 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 41 | + }, |
| 42 | + }, |
| 43 | + { |
| 44 | + files: ['test/**/*.{ts,js}'], |
| 45 | + rules: { |
| 46 | + '@typescript-eslint/no-unused-vars': 'off', |
| 47 | + }, |
| 48 | + }, |
| 49 | +] |
| 50 | + |
| 51 | + |
0 commit comments