diff --git a/jshint.json b/jshint.json new file mode 100644 index 0000000..0823462 --- /dev/null +++ b/jshint.json @@ -0,0 +1,18 @@ +{ + "asi": true, + "camelcase": true, + "freeze": true, + "immed": true, + "indent": 2, + "latedef": true, + "maxcomplexity": 10, + "noarg": true, + "noempty": true, + "nonbsp": true, + "node": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + "trailing": true +} diff --git a/package.json b/package.json index 3f89c32..5a78b4a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "mocha-lcov-reporter": "0.0.1", "helloblock-js": "^0.2.1", "request": "~2.34.0", - "browserify": "~4.1.5" + "browserify": "~4.1.5", + "jshint": "2.5.1" }, "testling": { "browsers": [ @@ -42,6 +43,7 @@ "unit": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- --reporter list `find test -maxdepth 1 -not -type d`", "test": "npm run-script unit", "integration": "./node_modules/.bin/_mocha --reporter list test/integration/*.js", + "jshint": "./node_modules/.bin/jshint --config jshint.json src/*.js ; true", "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js", "coveralls": "npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info", "compile": "./node_modules/.bin/browserify ./src/index.js -s Bitcoin | ./node_modules/.bin/uglifyjs > bitcoinjs-min.js"