Skip to content

Commit

Permalink
readd husky for lint/format precommit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanbond committed Mar 7, 2024
1 parent 238b51f commit 8159fdb
Show file tree
Hide file tree
Showing 4 changed files with 268 additions and 17 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
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
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
"types",
"index.d.ts"
],
"pre-commit": [
"lint",
"format"
],
"scripts": {
"build": "yarn doc && yarn lib && yarn dist",
"doc": "esdoc",
Expand All @@ -59,7 +55,8 @@
"serve": "jekyll serve --config _config.yml,_config.dev.yml",
"test": "mocha 'src/**/*.unit.js'",
"test:updateRenders": "npm run lib && TZ=UTC node --require jsdom-global/register test/updateRenders.js",
"test:e2e": "NODE_OPTIONS=\"--max-old-space-size=4096\" karma start --verbose --single-run"
"test:e2e": "NODE_OPTIONS=\"--max-old-space-size=4096\" karma start --verbose --single-run",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -151,6 +148,7 @@
"gulp-sync": "^0.1.4",
"gulp-watch": "^5.0.1",
"hoek": "^6.1.3",
"husky": ">=6",
"jquery": "^3.7.0",
"jsdom": "^22.1.0",
"jsdom-global": "^3.0.2",
Expand All @@ -160,6 +158,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"karma-webpack": "^5.0.0",
"lint-staged": ">=10",
"mocha": "^10.2.0",
"mock-local-storage": "^1.1.24",
"natives": "^1.1.6",
Expand All @@ -182,5 +181,11 @@
"webpack-node-externals": "^3.0.0",
"webpack-stream": "^7.0.0",
"written-number": "^0.11.1"
},
"lint-staged": {
"*.js": [
"eslint --cache --fix",
"prettier --write"
]
}
}
Loading

0 comments on commit 8159fdb

Please sign in to comment.