Skip to content

Commit

Permalink
Replace husky with pre-commit for JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
pgiraud committed Dec 30, 2024
1 parent 640498f commit 9cda552
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
5 changes: 0 additions & 5 deletions .husky/pre-commit

This file was deleted.

8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ repos:
entry: ruff format
language: system
types_or: [python, pyi]
- id: JS lint
name: JS lint
entry: bash -c "npm run lint"
language: node
- id: JS format
name: JS format
entry: bash -c "npm run format"
language: node
16 changes: 0 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
"build": "vite build",
"preview": "vite preview",
"lint": "eslint --ext .js,.vue --fix powa/static/",
"format": "prettier powa/static/js --check",
"prepare": "husky install"
"format": "prettier powa/static/js --check"
},
"pre-commit": [
"lint",
"format"
],
"devDependencies": {
"@mdi/js": "^7.4.47",
"@types/d3": "^7.4.3",
Expand All @@ -20,7 +23,6 @@
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-vue": "^9.26.0",
"eslint-plugin-vuetify": "^2.4.0",
"husky": "^8.0.3",
"prettier": "^2.8.8",
"sass": "^1.77.6",
"vite": "^5.4.6"
Expand Down

0 comments on commit 9cda552

Please sign in to comment.