Skip to content

Commit cce51d7

Browse files
committed
feat: eslint flat config
1 parent 6aa00b8 commit cce51d7

12 files changed

+808
-300
lines changed

.eslintrc.json

-3
This file was deleted.

.github/workflows/main.yml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: CI
22
on:
33
push:
44
branches: [main]
5-
workflow_dispatch:
65

76
jobs:
87
pages:

eslint.config.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { config } from "@debbl/eslint-config";
2+
import pluginNext from "@next/eslint-plugin-next";
3+
4+
export default config({
5+
react: true,
6+
typescript: true,
7+
8+
customConfig: [
9+
{
10+
plugins: {
11+
"@next/next": pluginNext,
12+
},
13+
rules: {
14+
...pluginNext.configs.recommended.rules,
15+
...pluginNext.configs["core-web-vitals"].rules,
16+
},
17+
},
18+
],
19+
});

next.config.js next.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ const nextConfig = {
55
basePath: "/code-diff",
66
};
77

8-
module.exports = nextConfig;
8+
export default nextConfig;

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "code-diff",
3+
"type": "module",
34
"version": "0.1.0",
45
"private": true,
56
"scripts": {
67
"dev": "next dev",
78
"build": "next build",
89
"start": "next start",
9-
"lint": "eslint . --ignore-path .gitignore",
10-
"lint:fix": "eslint . --fix --ignore-path .gitignore"
10+
"lint": "eslint .",
11+
"lint:fix": "eslint . --fix"
1112
},
1213
"dependencies": {
1314
"@debbl/ahooks": "0.0.10",
@@ -20,7 +21,7 @@
2021
"zustand": "^4.4.4"
2122
},
2223
"devDependencies": {
23-
"@debbl/eslint-config": "^0.0.65",
24+
"@debbl/eslint-config": "^1.0.0",
2425
"@iconify/icons-carbon": "^1.2.20",
2526
"@iconify/react": "^4.1.1",
2627
"@types/node": "20.8.9",

0 commit comments

Comments
 (0)