Skip to content

Commit 2dd91e1

Browse files
committed
chore: replace Husky with simple-git-hooks for pre-commit linting
- Updated package.json to use simple-git-hooks instead of Husky for managing pre-commit hooks. - Added lint-staged configuration to run ESLint on staged JavaScript and TypeScript files. - Removed Husky installation script and pre-commit hook files. - Updated pnpm-lock.yaml to include simple-git-hooks dependency.
1 parent 91b656a commit 2dd91e1

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

.husky/install.mjs

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

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vscode/settings.json

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

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"lint:js:fix": "eslint --fix \"**/*.{js,jsx,ts,tsx,cjs,mjs,vue}\"",
1919
"lint:style": "npm run stylelint \"**/*.{css,scss}\"",
2020
"lint:style:fix": "npm run stylelint:fix \"**/*.{css,scss}\"",
21-
"prepare": "node .husky/install.mjs"
21+
"prepare": "simple-git-hooks"
2222
},
2323
"dependencies": {
2424
"@mdi/js": "^7.4.47",
@@ -53,6 +53,7 @@
5353
"rollup-plugin-visualizer": "^7.0.1",
5454
"sass": "^1.98.0",
5555
"sass-loader": "^16.0.7",
56+
"simple-git-hooks": "^2.13.1",
5657
"stylelint": "^17.6.0",
5758
"stylelint-config-standard": "^40.0.0",
5859
"stylelint-config-standard-scss": "^17.0.0",
@@ -64,11 +65,20 @@
6465
"vue-eslint-parser": "^10.4.0",
6566
"vue-tsc": "^3.2.6"
6667
},
68+
"simple-git-hooks": {
69+
"pre-commit": "pnpx lint-staged"
70+
},
71+
"lint-staged": {
72+
"**/*.{js,ts,vue,json}": [
73+
"eslint --fix --cache"
74+
]
75+
},
6776
"pnpm": {
6877
"onlyBuiltDependencies": [
6978
"@parcel/watcher",
7079
"@sentry/cli",
7180
"esbuild",
81+
"simple-git-hooks",
7282
"unrs-resolver",
7383
"vue-demi"
7484
]

pnpm-lock.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)