Skip to content

Commit bb47b44

Browse files
committed
chore: per-commit lint
1 parent 1bb6c5f commit bb47b44

File tree

7 files changed

+321
-12
lines changed

7 files changed

+321
-12
lines changed

.husky/pre-commit

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
npx --no-install lint-staged --quiet
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.lintstagedrc

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
{
2-
"*.{md,json}": [
3-
"prettier --cache --write"
4-
],
5-
"*.{js,jsx}": [
6-
"max lint --fix --eslint-only",
7-
"prettier --cache --write"
8-
],
2+
"*.{md,json}": ["prettier --cache --write"],
3+
"*.{js,jsx}": ["max lint --fix --eslint-only", "prettier --cache --write"],
94
"*.{css,less}": [
105
"max lint --fix --stylelint-only",
116
"prettier --cache --write"
127
],
138
"*.ts?(x)": [
149
"max lint --fix --eslint-only",
1510
"prettier --cache --parser=typescript --write"
16-
]
11+
],
12+
"src/locales/**/*.ts": ["npx tsx src/locales/check.ts"]
1713
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"prettier-plugin-organize-imports": "^3.2.4",
9494
"prettier-plugin-packagejson": "^2.5.0",
9595
"prettier-plugin-two-style-order": "^1.0.1",
96+
"tsx": "^4.19.3",
9697
"typescript": "^5.4.5",
9798
"url-loader": "^4.1.1",
9899
"webpack-bundle-analyzer": "^4.10.2",

0 commit comments

Comments
 (0)