|
1 | | -// import { FlatCompat } from "@eslint/eslintrc"; |
2 | | -// import tseslint from "typescript-eslint"; |
| 1 | +import { FlatCompat } from "@eslint/eslintrc"; |
| 2 | +import tseslint from "typescript-eslint"; |
3 | 3 |
|
4 | | -// const compat = new FlatCompat({ |
5 | | -// baseDirectory: import.meta.dirname, |
6 | | -// }); |
| 4 | +const compat = new FlatCompat({ |
| 5 | + baseDirectory: import.meta.dirname, |
| 6 | +}); |
7 | 7 |
|
8 | | -// export default tseslint.config( |
9 | | -// { |
10 | | -// ignores: [".next"], |
11 | | -// }, |
12 | | -// ...compat.extends("next/core-web-vitals"), |
13 | | -// { |
14 | | -// files: ["**/*.ts", "**/*.tsx"], |
15 | | -// extends: [ |
16 | | -// ...tseslint.configs.recommended, |
17 | | -// ...tseslint.configs.recommendedTypeChecked, |
18 | | -// ...tseslint.configs.stylisticTypeChecked, |
19 | | -// ], |
20 | | -// rules: { |
21 | | -// "@typescript-eslint/array-type": "off", |
22 | | -// "@typescript-eslint/consistent-type-definitions": "off", |
23 | | -// "@typescript-eslint/consistent-type-imports": [ |
24 | | -// "warn", |
25 | | -// { prefer: "type-imports", fixStyle: "inline-type-imports" }, |
26 | | -// ], |
27 | | -// "@typescript-eslint/no-unused-vars": [ |
28 | | -// "warn", |
29 | | -// { argsIgnorePattern: "^_" }, |
30 | | -// ], |
31 | | -// "@typescript-eslint/require-await": "off", |
32 | | -// "@typescript-eslint/no-misused-promises": [ |
33 | | -// "error", |
34 | | -// { checksVoidReturn: { attributes: false } }, |
35 | | -// ], |
36 | | -// }, |
37 | | -// }, |
38 | | -// { |
39 | | -// linterOptions: { |
40 | | -// reportUnusedDisableDirectives: true, |
41 | | -// }, |
42 | | -// languageOptions: { |
43 | | -// parserOptions: { |
44 | | -// projectService: true, |
45 | | -// }, |
46 | | -// }, |
47 | | -// }, |
48 | | -// ); |
| 8 | +export default tseslint.config( |
| 9 | + { |
| 10 | + ignores: [".next"], |
| 11 | + }, |
| 12 | + ...compat.extends("next/core-web-vitals"), |
| 13 | + { |
| 14 | + files: ["**/*.ts", "**/*.tsx"], |
| 15 | + extends: [ |
| 16 | + ...tseslint.configs.recommended, |
| 17 | + ...tseslint.configs.recommendedTypeChecked, |
| 18 | + ...tseslint.configs.stylisticTypeChecked, |
| 19 | + ], |
| 20 | + rules: { |
| 21 | + "@typescript-eslint/array-type": "off", |
| 22 | + "@typescript-eslint/consistent-type-definitions": "off", |
| 23 | + "@typescript-eslint/consistent-type-imports": [ |
| 24 | + "warn", |
| 25 | + { prefer: "type-imports", fixStyle: "inline-type-imports" }, |
| 26 | + ], |
| 27 | + "@typescript-eslint/no-unused-vars": [ |
| 28 | + "warn", |
| 29 | + { argsIgnorePattern: "^_" }, |
| 30 | + ], |
| 31 | + "@typescript-eslint/require-await": "off", |
| 32 | + "@typescript-eslint/no-misused-promises": [ |
| 33 | + "error", |
| 34 | + { checksVoidReturn: { attributes: false } }, |
| 35 | + ], |
| 36 | + }, |
| 37 | + }, |
| 38 | + { |
| 39 | + linterOptions: { |
| 40 | + reportUnusedDisableDirectives: true, |
| 41 | + }, |
| 42 | + languageOptions: { |
| 43 | + parserOptions: { |
| 44 | + projectService: true, |
| 45 | + }, |
| 46 | + }, |
| 47 | + }, |
| 48 | +); |
0 commit comments