Skip to content

Commit

Permalink
install pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanbond committed Dec 6, 2024
1 parent d7a364b commit 2821969
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 9 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
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
"sdk.d.ts",
"utils.d.ts"
],
"pre-commit": [
"lint"
],
"scripts": {
"build": "yarn doc && yarn lib && yarn dist",
"doc": "typedoc",
Expand All @@ -58,7 +55,8 @@
"format": "prettier --write .",
"serve": "jekyll serve --config _config.yml,_config.dev.yml",
"test": "nyc --reporter=lcov --reporter=text --reporter=text-summary mocha test/unit/*.unit.js",
"show-coverage": "open coverage/lcov-report/index.html"
"show-coverage": "open coverage/lcov-report/index.html",
"prepare": "husky"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -147,6 +145,7 @@
"gulp-sync": "^0.1.4",
"gulp-watch": "^5.0.1",
"hoek": "^6.1.3",
"husky": ">=6",
"jsdom": "22.1.0",
"jsdom-global": "^3.0.2",
"karma": "^6.4.3",
Expand All @@ -155,6 +154,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"karma-webpack": "^5.0.1",
"lint-staged": ">=10",
"mocha": "^10.3.0",
"mock-local-storage": "^1.1.24",
"natives": "^1.1.6",
Expand Down Expand Up @@ -192,5 +192,9 @@
"src/**/fixtures"
],
"all": true
},
"lint-staged": {
"**/*.{js,mjs,cjs}": "eslint --fix",
"*.{js,mjs,cjs,css,md}": "prettier --write"
}
}
Loading

0 comments on commit 2821969

Please sign in to comment.