Skip to content

Commit 3a05d4c

Browse files
committed
Add pre-commit hook lint and test
1 parent 41adaa1 commit 3a05d4c

File tree

3 files changed

+260
-2
lines changed

3 files changed

+260
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
node_modules
33
dist
44
.cache
5-
coverage
5+
coverage
6+
.eslintcache

package-lock.json

Lines changed: 251 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
"description": "A set of tools for emulating browser behavior in jsdom environment",
55
"main": "dist/index.js",
66
"scripts": {
7+
"lint": "eslint ./src",
78
"test": "jest",
89
"test:coverage": "npm run test -- --coverage --no-cache",
910
"start": "babel src --watch --out-dir dist",
1011
"build": "babel src --out-dir dist"
1112
},
13+
"husky": {
14+
"hooks": {
15+
"pre-commit": "npm run lint && npm run test"
16+
}
17+
},
1218
"repository": {
1319
"type": "git",
1420
"url": "git+https://github.com/trurl-master/jsdom-testing-mocks.git"
@@ -40,6 +46,7 @@
4046
"eslint-plugin-jest": "^23.1.1",
4147
"eslint-plugin-prettier": "^3.1.1",
4248
"eslint-plugin-react": "^7.17.0",
49+
"husky": "^3.1.0",
4350
"jest": "^24.9.0",
4451
"nodemon": "^2.0.1",
4552
"prettier": "^1.19.1"

0 commit comments

Comments
 (0)