File tree Expand file tree Collapse file tree 3 files changed +902
-2090
lines changed
Expand file tree Collapse file tree 3 files changed +902
-2090
lines changed Original file line number Diff line number Diff line change 1- import { dirname } from "path" ;
2- import { fileURLToPath } from "url" ;
3- import { FlatCompat } from "@eslint/eslintrc" ;
1+ import { defineConfig , globalIgnores } from "eslint/config" ;
2+ import nextVitals from "eslint-config-next/core-web-vitals" ;
3+ import tsPlugin from "@typescript-eslint/eslint-plugin" ;
4+ import nextTs from "eslint-config-next/typescript" ;
45
5- const __filename = fileURLToPath ( import . meta. url ) ;
6- const __dirname = dirname ( __filename ) ;
7-
8- const compat = new FlatCompat ( {
9- baseDirectory : __dirname ,
10- } ) ;
11-
12- const eslintConfig = [ {
13- ignores : [
6+ const eslintConfig = defineConfig ( [
7+ ...nextVitals ,
8+ ...nextTs ,
9+ {
10+ rules : {
11+ "@typescript-eslint/no-unused-vars" : "error" ,
12+ } ,
13+ plugins : {
14+ "@typescript-eslint" : tsPlugin ,
15+ }
16+ } ,
17+ globalIgnores ( [
1418 "node_modules/**" ,
1519 ".next/**" ,
1620 "out/**" ,
@@ -25,16 +29,7 @@ const eslintConfig = [{
2529 "playwright-report/**" ,
2630 "pact/**" ,
2731 "performance/report" ,
28- ]
29- } , ...compat . extends (
30- "next/core-web-vitals" ,
31- "next/typescript" ,
32- "prettier" ,
33- "next" ,
34- ) , {
35- "rules" : {
36- "@typescript-eslint/no-unused-vars" : "error" ,
37- }
38- } ] ;
32+ ] ) ,
33+ ] ) ;
3934
4035export default eslintConfig ;
You can’t perform that action at this time.
0 commit comments