Updated to nextjs v16
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { FlatCompat } from "@eslint/eslintrc"
|
||||
import { dirname } from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import nextVitals from "eslint-config-next/core-web-vitals"
|
||||
import nextTs from "eslint-config-next/typescript"
|
||||
import { defineConfig, globalIgnores } from "eslint/config"
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = dirname(__filename)
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname
|
||||
})
|
||||
|
||||
const eslintConfig = [{
|
||||
ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"]
|
||||
}, ...compat.extends("next/core-web-vitals", "next/typescript")]
|
||||
const eslintConfig = defineConfig([
|
||||
...nextVitals,
|
||||
...nextTs,
|
||||
globalIgnores([
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"next-env.d.ts"
|
||||
])
|
||||
])
|
||||
|
||||
export default eslintConfig
|
||||
|
||||
Reference in New Issue
Block a user