|
| 1 | +import eslint from '@eslint/js' |
| 2 | +import tseslint from 'typescript-eslint' |
| 3 | +import prettier from 'eslint-config-prettier' |
| 4 | +import functional from 'eslint-plugin-functional' |
| 5 | +import globals from 'globals' |
| 6 | + |
| 7 | +export default tseslint.config( |
| 8 | + { |
| 9 | + files: ['**/*.{ts,tsx,mts}'], |
| 10 | + extends: [ |
| 11 | + eslint.configs.recommended, |
| 12 | + ...tseslint.configs.recommended, |
| 13 | + functional.configs.recommended, |
| 14 | + prettier, |
| 15 | + ], |
| 16 | + languageOptions: { |
| 17 | + parser: tseslint.parser, |
| 18 | + parserOptions: { |
| 19 | + projectService: true, |
| 20 | + }, |
| 21 | + globals: { ...globals.browser, ...globals.node }, |
| 22 | + }, |
| 23 | + rules: { |
| 24 | + 'functional/prefer-immutable-types': 'warn', |
| 25 | + 'no-unused-vars': 'off', |
| 26 | + '@typescript-eslint/triple-slash-reference': 'warn', |
| 27 | + }, |
| 28 | + }, |
| 29 | + { |
| 30 | + files: ['**/*.test.ts', '**/*.{js,mjs,cjs}'], |
| 31 | + extends: [functional.configs.off], |
| 32 | + rules: { |
| 33 | + '@typescript-eslint/no-explicit-any': 'off', |
| 34 | + }, |
| 35 | + }, |
| 36 | + { ignores: ['dist', '.yarn', '.preview'] }, |
| 37 | +) |
0 commit comments