This commit is contained in:
parent
41399b9cfa
commit
16e0a6a5e6
|
|
@ -1,18 +1,16 @@
|
||||||
import { defineConfig, globalIgnores } from "eslint/config";
|
import { dirname } from "path";
|
||||||
import nextVitals from "eslint-config-next/core-web-vitals";
|
import { fileURLToPath } from "url";
|
||||||
import nextTs from "eslint-config-next/typescript";
|
import { FlatCompat } from "@eslint/eslintrc";
|
||||||
|
|
||||||
const eslintConfig = defineConfig([
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
...nextVitals,
|
const __dirname = dirname(__filename);
|
||||||
...nextTs,
|
|
||||||
// Override default ignores of eslint-config-next.
|
const compat = new FlatCompat({
|
||||||
globalIgnores([
|
baseDirectory: __dirname,
|
||||||
// Default ignores of eslint-config-next:
|
});
|
||||||
".next/**",
|
|
||||||
"out/**",
|
const eslintConfig = [
|
||||||
"build/**",
|
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||||
"next-env.d.ts",
|
];
|
||||||
]),
|
|
||||||
]);
|
|
||||||
|
|
||||||
export default eslintConfig;
|
export default eslintConfig;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue