Skip to content

Commit

Permalink
husky and lint-staged added
Browse files Browse the repository at this point in the history
  • Loading branch information
NishargShah committed Aug 30, 2021
1 parent c7edc9d commit 15eeb4e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"prepublishOnly": "npm run build"
"pre-commit": "npx husky add .husky/pre-commit \"npx lint-staged\"",
"prepublishOnly": "npm run build",
"prepare": "npm run build && husky install"
},
"lint-staged": {
"*.{vue,js}": [
"eslint --fix"
]
},
"dependencies": {
"vue": "^3.2.6"
Expand All @@ -40,6 +47,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-vue": "^7.17.0",
"husky": "^7.0.2",
"lint-staged": "^11.1.2",
"prettier": "^2.3.2",
"vite": "^2.5.1",
Expand Down

0 comments on commit 15eeb4e

Please sign in to comment.