|
1 | | -import js from '@eslint/js'; |
2 | | -import tseslint from 'typescript-eslint'; |
| 1 | +import js from "@eslint/js"; |
| 2 | +import tseslint from "typescript-eslint"; |
| 3 | +import eslintConfigPrettier from "eslint-config-prettier"; |
3 | 4 |
|
4 | 5 | export default tseslint.config( |
5 | 6 | { |
6 | | - ignores: ['dist/**', 'node_modules/**'], |
| 7 | + ignores: [ |
| 8 | + "dist/**", |
| 9 | + "node_modules/**", |
| 10 | + "coverage/**", |
| 11 | + "bun.lock", |
| 12 | + "*.config.js", |
| 13 | + "*.config.cjs", |
| 14 | + "*.config.mjs", |
| 15 | + ], |
7 | 16 | }, |
| 17 | + |
8 | 18 | js.configs.recommended, |
9 | | - ...tseslint.configs.recommendedTypeChecked, |
| 19 | + ...tseslint.configs.recommended, |
| 20 | + |
10 | 21 | { |
11 | | - files: ['src/**/*.ts'], |
| 22 | + files: ["**/*.ts", "**/*.tsx"], |
| 23 | + extends: [...tseslint.configs.recommendedTypeChecked], |
12 | 24 | languageOptions: { |
13 | 25 | parserOptions: { |
14 | | - project: './tsconfig.json', |
| 26 | + projectService: true, |
15 | 27 | tsconfigRootDir: import.meta.dirname, |
16 | 28 | }, |
17 | 29 | }, |
18 | 30 | rules: { |
19 | | - '@typescript-eslint/consistent-type-imports': 'error', |
20 | | - '@typescript-eslint/no-floating-promises': 'error', |
21 | | - '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }], |
22 | | - '@typescript-eslint/no-explicit-any': 'off', |
23 | | - '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], |
| 31 | + "@typescript-eslint/no-explicit-any": "off", |
| 32 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 33 | + "@typescript-eslint/no-unsafe-call": "off", |
| 34 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 35 | + "@typescript-eslint/no-unsafe-return": "off", |
| 36 | + "@typescript-eslint/require-await": "off", |
| 37 | + "@typescript-eslint/no-misused-promises": [ |
| 38 | + "error", |
| 39 | + { |
| 40 | + checksVoidReturn: false, |
| 41 | + }, |
| 42 | + ], |
| 43 | + "no-console": "off", |
24 | 44 | }, |
25 | 45 | }, |
| 46 | + |
| 47 | + eslintConfigPrettier, |
26 | 48 | ); |
0 commit comments