Skip to content

Commit ef733db

Browse files
alswlcursoragent
andcommitted
chore: enable lint in pre-commit, use English comments and UI labels
- Add lint script and lint-staged config in package.json - Pre-commit uses --config package.json to avoid legacy linters config - Remove .lintstagedrc (config moved to package.json) - Fix ESLint no-unused-vars in src/nodes/er.ts - Use English comments and tooltips in viewer and viewMode Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 085dd65 commit ef733db

File tree

7 files changed

+7540
-2619
lines changed

7 files changed

+7540
-2619
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx --no-install lint-staged --quiet
1+
npx --no-install lint-staged --config package.json --quiet

.lintstagedrc

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

package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"dev": "max dev",
88
"format": "prettier --cache --write .",
99
"postinstall": "max setup",
10+
"lint": "max lint",
1011
"prepare": "husky",
1112
"setup": "max setup",
1213
"start": "npm run dev",
@@ -17,6 +18,23 @@
1718
"test:e2e:ui": "playwright test --ui",
1819
"test:watch": "jest --watch"
1920
},
21+
"lint-staged": {
22+
"*.{md,json}": [
23+
"prettier --cache --write"
24+
],
25+
"*.{js,jsx}": [
26+
"max lint --fix --eslint-only",
27+
"prettier --cache --write"
28+
],
29+
"*.{css,less}": [
30+
"max lint --fix --stylelint-only",
31+
"prettier --cache --write"
32+
],
33+
"*.{ts,tsx}": [
34+
"max lint --fix --eslint-only",
35+
"prettier --cache --write"
36+
]
37+
},
2038
"dependencies": {
2139
"@ant-design/icons": "^5.0.1",
2240
"@ant-design/pro-components": "^2.4.4",

0 commit comments

Comments
 (0)