Skip to content

Commit

Permalink
update precommit hook for new husky version
Browse files Browse the repository at this point in the history
  • Loading branch information
tjenkinson committed Apr 7, 2021
1 parent b7d7a0d commit 11d5887
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 3 additions & 2 deletions scripts/precommit.sh → .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

set -e
npm run lint:staged
npm run type-check
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
"publishConfig": {
"access": "public"
},
"husky": {
"hooks": {
"pre-commit": "./scripts/precommit.sh"
}
},
"scripts": {
"build": "webpack --progress && npm run build:types",
"build:ci": "webpack && tsc --build tsconfig-lib.json && api-extractor run",
Expand All @@ -51,7 +46,8 @@
"test:func:sauce": "SAUCE=1 UA=safari OS='OS X 10.15' BABEL_ENV=development mocha --require @babel/register tests/functional/auto/setup.js --timeout 40000 --exit",
"test:func:sauce-ie": "SAUCE=1 UA='internet explorer' OS='Windows 10' BABEL_ENV=development mocha --require @babel/register tests/functional/auto/setup.js --timeout 40000 --exit",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
"type-check:watch": "npm run type-check -- --watch",
"prepare": "husky install"
},
"devDependencies": {
"@babel/core": "7.13.14",
Expand Down

0 comments on commit 11d5887

Please sign in to comment.