Skip to content

Commit

Permalink
chore(deps-dev): add husky and lint-staged
Browse files Browse the repository at this point in the history
to automatically `eslint --fix` before commited
  • Loading branch information
dimaslanjaka committed May 6, 2023
1 parent bb5503f commit 6ec68d7
Show file tree
Hide file tree
Showing 2 changed files with 8 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
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"eslint": "eslint .",
"pretest": "npm run clean && npm run build",
"test": "mocha test/index.js --require ts-node/register",
"test-cov": "c8 --reporter=lcovonly npm run test"
"test-cov": "c8 --reporter=lcovonly npm run test",
"prepare": "husky install"
},
"files": [
"dist"
Expand Down Expand Up @@ -39,6 +40,8 @@
"chai": "^4.3.6",
"eslint": "^8.23.1",
"eslint-config-hexo": "^5.0.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"mocha": "^10.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
Expand Down

0 comments on commit 6ec68d7

Please sign in to comment.