Skip to content

Commit de23a15

Browse files
authored
update eslint (#4)
1 parent af2673b commit de23a15

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
22

33
echo "Formatting staged files..."
4-
npm run lint-staged
4+
npx lint-staged
55

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc -b && vite build",
9-
"lint": "eslint .",
9+
"elint": "eslint .",
10+
"lint": "tsc --noEmit -p tsconfig.json",
1011
"preview": "vite preview",
1112
"format": "prettier --write .",
1213
"format:check": "prettier --check .",
@@ -43,6 +44,12 @@
4344
"vite": "^7.3.1"
4445
},
4546
"lint-staged": {
46-
"*.{ts,tsx,js,jsx,json,md}": "prettier --write"
47+
"*.{ts,tsx,js,jsx}": [
48+
"eslint --fix",
49+
"prettier --write"
50+
],
51+
"*.{json,css,md,yml,yaml}": [
52+
"prettier --write"
53+
]
4754
}
4855
}

0 commit comments

Comments
 (0)