Skip to content

Commit

Permalink
chore: code consistency (#555)
Browse files Browse the repository at this point in the history
addition of the husky module to run the linter before a commit
  • Loading branch information
helio-frota committed Apr 16, 2021
1 parent 4d0abf9 commit 443c24c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
@@ -1,5 +1,6 @@
{
"extends": "semistandard",
"ignorePatterns": ["docs/**/*.js"],
"rules": {
"prefer-const": "error",
"block-scoped-var": "error",
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -6,11 +6,12 @@
"nodeshift": "./bin/nodeshift"
},
"scripts": {
"pretest": "eslint bin/* lib/**/*.js lib/**/**/*.js test/*-test.js test/**/*-test.js index.js",
"prepare": "husky install",
"pretest": "eslint --ignore-path .gitignore .",
"test": "cross-env NODESHIFT_QUIET=true nyc tape test/*-test.js test/**/*-test.js | tap-spec",
"coverage": "nyc npm test && nyc report --reporter=html",
"docs": "documentation build index.js --shallow -f html -o docs --config documentation.yml",
"prerelease": "npm run lint && npm run test",
"prerelease": "npm run test",
"release": "standard-version -a"
},
"standard-version": {
Expand Down Expand Up @@ -63,6 +64,7 @@
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-promise": "~4.3.1",
"eslint-plugin-standard": "^4.1.0",
"husky": "^6.0.0",
"ink-docstrap": "^1.3.2",
"nock": "^12.0.2",
"nyc": "~15.1.0",
Expand Down

0 comments on commit 443c24c

Please sign in to comment.