Update ESLint config to use FlatCompat and expand ignores
Switched to using FlatCompat for ESLint configuration and extended the ignore list to include 'next-env.d.ts', 'postcss.config.js', and 'prettier.config.js'. This improves compatibility and prevents linting of config and environment files.
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
|
import { FlatCompat } from "@eslint/eslintrc";
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
|
const compat = new FlatCompat({
|
||||||
|
baseDirectory: import.meta.dirname,
|
||||||
|
});
|
||||||
|
|
||||||
export default tseslint.config(
|
export default tseslint.config(
|
||||||
{
|
{
|
||||||
ignores: [".next"],
|
ignores: [".next", "next-env.d.ts", "postcss.config.js", "prettier.config.js"],
|
||||||
},
|
},
|
||||||
...compat.extends("next/core-web-vitals"),
|
...compat.extends("next/core-web-vitals"),
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user