Skip to content

Commit c2f42f2

Browse files
committed
chore: migrate lint to eslint cli
1 parent dc10447 commit c2f42f2

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

eslint.config.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { FlatCompat } from "@eslint/eslintrc";
2+
import { dirname } from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
const compat = new FlatCompat({ baseDirectory: __dirname });
8+
9+
const eslintConfig = [
10+
...compat.extends("next/core-web-vitals", "next/typescript"),
11+
{
12+
ignores: [
13+
"node_modules/**",
14+
".next/**",
15+
"out/**",
16+
"build/**",
17+
"next-env.d.ts",
18+
],
19+
},
20+
];
21+
22+
export default eslintConfig;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint",
9+
"lint": "eslint .",
1010
"export": "next build && next export"
1111
},
1212
"dependencies": {

0 commit comments

Comments
 (0)