Skip to content

Commit c4bbfcc

Browse files
committed
style: update lint rule to eslint v9
Signed-off-by: Zxilly <[email protected]>
1 parent 5758c4c commit c4bbfcc

36 files changed

+3574
-3137
lines changed

ui/.eslintrc.cjs

Lines changed: 0 additions & 46 deletions
This file was deleted.

ui/eslint.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import antfu from "@antfu/eslint-config";
2+
3+
export default antfu({
4+
react: true,
5+
rules: {
6+
"no-console": "off",
7+
},
8+
stylistic: {
9+
indent: 2,
10+
quotes: "double",
11+
semi: true,
12+
},
13+
}, {
14+
ignores: [
15+
"dist",
16+
"coverage",
17+
"src/generated/schema.ts",
18+
"src/tool/wasm_exec.js",
19+
],
20+
});

ui/package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "go-size-analyzer-ui",
3+
"type": "module",
34
"version": "0.0.1",
45
"private": true,
5-
"type": "module",
66
"scripts": {
77
"build:ui": "tsc && vite -c vite.config.ts build",
88
"build:explorer": "tsc && vite -c vite.config-explorer.ts build",
99
"dev:ui": "vite -c vite.config.ts",
1010
"dev:explorer": "vite -c vite.config-explorer.ts",
1111
"generate": "typia generate --input src/schema --output src/generated --project tsconfig.json",
12-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
13-
"lint:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix",
12+
"lint": "eslint .",
13+
"lint:fix": "eslint . --fix",
1414
"test": "vitest run"
1515
},
1616
"dependencies": {
@@ -27,6 +27,7 @@
2727
"react-use": "^17.5.0"
2828
},
2929
"devDependencies": {
30+
"@antfu/eslint-config": "^2.21.2",
3031
"@codecov/vite-plugin": "0.0.1-beta.10",
3132
"@microsoft/eslint-formatter-sarif": "^3.1.0",
3233
"@testing-library/dom": "^10.3.0",
@@ -41,14 +42,11 @@
4142
"@types/node": "^20.14.9",
4243
"@types/react": "^18.3.3",
4344
"@types/react-dom": "^18.3.0",
44-
"@typescript-eslint/eslint-plugin": "^7.15.0",
45-
"@typescript-eslint/parser": "^7.15.0",
4645
"@vitejs/plugin-react-swc": "^3.7.0",
4746
"@vitest/coverage-istanbul": "^1.6.0",
4847
"eslint": "^9.6.0",
49-
"eslint-plugin-import": "^2.29.1",
50-
"eslint-plugin-react": "^7.34.3",
51-
"eslint-plugin-react-hooks": "^4.6.2",
48+
"eslint-plugin-import-x": "^0.5.3",
49+
"eslint-plugin-react-hooks": "5.1.0-rc-100dfd7dab-20240701",
5250
"eslint-plugin-react-refresh": "^0.4.7",
5351
"jsdom": "^24.1.0",
5452
"junit": "^1.4.9",

0 commit comments

Comments
 (0)