Skip to content

Commit 5ac760f

Browse files
committed
feat(scripts): prevent pushing failed lint or tests
1 parent bb88940 commit 5ac760f

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"seed": "node db/seed.js",
2525
"deploy-heroku": "bin/deploy-heroku.sh",
2626
"lint": "esw . --ignore-path .gitignore --ext '.js,.jsx'",
27-
"lint-watch": "npm run lint -- -w"
27+
"lint-watch": "npm run lint -- -w",
28+
"prepush": "npm run lint && npm run test"
2829
},
2930
"repository": {
3031
"type": "git",
@@ -92,6 +93,7 @@
9293
"eslint-plugin-react": "^6.10.3",
9394
"eslint-plugin-standard": "^3.0.1",
9495
"eslint-watch": "^3.1.0",
96+
"husky": "^0.13.3",
9597
"mocha": "^3.1.2",
9698
"nodemon": "^1.11.0",
9799
"supertest": "^3.0.0",

yarn.lock

+27
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,10 @@ chokidar@^1.4.3:
11881188
optionalDependencies:
11891189
fsevents "^1.0.0"
11901190

1191+
ci-info@^1.0.0:
1192+
version "1.0.0"
1193+
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534"
1194+
11911195
cipher-base@^1.0.0, cipher-base@^1.0.1:
11921196
version "1.0.3"
11931197
resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.3.tgz#eeabf194419ce900da3018c207d212f2a6df0a07"
@@ -2164,6 +2168,10 @@ find-cache-dir@^0.1.1:
21642168
mkdirp "^0.5.1"
21652169
pkg-dir "^1.0.0"
21662170

2171+
find-parent-dir@^0.3.0:
2172+
version "0.3.0"
2173+
resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54"
2174+
21672175
find-up@^1.0.0:
21682176
version "1.1.2"
21692177
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
@@ -2521,6 +2529,15 @@ https-browserify@0.0.1:
25212529
version "0.0.1"
25222530
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82"
25232531

2532+
husky@^0.13.3:
2533+
version "0.13.3"
2534+
resolved "https://registry.yarnpkg.com/husky/-/husky-0.13.3.tgz#bc2066080badc8b8fe3516e881f5bc68a57052ff"
2535+
dependencies:
2536+
chalk "^1.1.3"
2537+
find-parent-dir "^0.3.0"
2538+
is-ci "^1.0.9"
2539+
normalize-path "^1.0.0"
2540+
25242541
iconv-lite@0.4.13, iconv-lite@~0.4.13:
25252542
version "0.4.13"
25262543
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
@@ -2632,6 +2649,12 @@ is-callable@^1.1.1, is-callable@^1.1.2, is-callable@^1.1.3:
26322649
version "1.1.3"
26332650
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
26342651

2652+
is-ci@^1.0.9:
2653+
version "1.0.10"
2654+
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
2655+
dependencies:
2656+
ci-info "^1.0.0"
2657+
26352658
is-date-object@^1.0.1:
26362659
version "1.0.1"
26372660
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
@@ -3351,6 +3374,10 @@ normalize-package-data@^2.3.2:
33513374
semver "2 || 3 || 4 || 5"
33523375
validate-npm-package-license "^3.0.1"
33533376

3377+
normalize-path@^1.0.0:
3378+
version "1.0.0"
3379+
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379"
3380+
33543381
normalize-path@^2.0.1:
33553382
version "2.0.1"
33563383
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a"

0 commit comments

Comments
 (0)