42 lines
942 B
JavaScript
42 lines
942 B
JavaScript
import { FlatCompat } from "@eslint/eslintrc";
|
|
import { dirname } from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
});
|
|
|
|
const eslintConfig = [
|
|
...compat.extends("next/core-web-vitals", "next/typescript", "prettier"),
|
|
{
|
|
rules: {
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/no-explicit-any": "error",
|
|
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"no-debugger": "error",
|
|
"prefer-const": "error",
|
|
"no-var": "error",
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
".next/**",
|
|
"out/**",
|
|
"dist/**",
|
|
"build/**",
|
|
"node_modules/**",
|
|
"*.config.js",
|
|
"*.config.mjs",
|
|
"*.config.ts",
|
|
".env*",
|
|
"coverage/**",
|
|
],
|
|
},
|
|
];
|
|
|
|
export default eslintConfig;
|