diff --git a/eslint.config.js b/eslint.config.js index 35a2fda..18540a3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,48 +1,48 @@ -// import { FlatCompat } from "@eslint/eslintrc"; -// import tseslint from "typescript-eslint"; +import { FlatCompat } from "@eslint/eslintrc"; +import tseslint from "typescript-eslint"; -// const compat = new FlatCompat({ -// baseDirectory: import.meta.dirname, -// }); +const compat = new FlatCompat({ + baseDirectory: import.meta.dirname, +}); -// export default tseslint.config( -// { -// ignores: [".next"], -// }, -// ...compat.extends("next/core-web-vitals"), -// { -// files: ["**/*.ts", "**/*.tsx"], -// extends: [ -// ...tseslint.configs.recommended, -// ...tseslint.configs.recommendedTypeChecked, -// ...tseslint.configs.stylisticTypeChecked, -// ], -// rules: { -// "@typescript-eslint/array-type": "off", -// "@typescript-eslint/consistent-type-definitions": "off", -// "@typescript-eslint/consistent-type-imports": [ -// "warn", -// { prefer: "type-imports", fixStyle: "inline-type-imports" }, -// ], -// "@typescript-eslint/no-unused-vars": [ -// "warn", -// { argsIgnorePattern: "^_" }, -// ], -// "@typescript-eslint/require-await": "off", -// "@typescript-eslint/no-misused-promises": [ -// "error", -// { checksVoidReturn: { attributes: false } }, -// ], -// }, -// }, -// { -// linterOptions: { -// reportUnusedDisableDirectives: true, -// }, -// languageOptions: { -// parserOptions: { -// projectService: true, -// }, -// }, -// }, -// ); +export default tseslint.config( + { + ignores: [".next"], + }, + ...compat.extends("next/core-web-vitals"), + { + files: ["**/*.ts", "**/*.tsx"], + extends: [ + ...tseslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + ...tseslint.configs.stylisticTypeChecked, + ], + rules: { + "@typescript-eslint/array-type": "off", + "@typescript-eslint/consistent-type-definitions": "off", + "@typescript-eslint/consistent-type-imports": [ + "warn", + { prefer: "type-imports", fixStyle: "inline-type-imports" }, + ], + "@typescript-eslint/no-unused-vars": [ + "warn", + { argsIgnorePattern: "^_" }, + ], + "@typescript-eslint/require-await": "off", + "@typescript-eslint/no-misused-promises": [ + "error", + { checksVoidReturn: { attributes: false } }, + ], + }, + }, + { + linterOptions: { + reportUnusedDisableDirectives: true, + }, + languageOptions: { + parserOptions: { + projectService: true, + }, + }, + }, +);