diff --git a/.jshintrc b/.jshintrc index 3c0f578..fffe0aa 100644 --- a/.jshintrc +++ b/.jshintrc @@ -4,5 +4,6 @@ "curly": false, "-W058": true, "eqeqeq": false, - "node": true + "node": true, + "validthis": true } diff --git a/package.json b/package.json index ac2c0bb..ffefcc0 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ ], "scripts": { "eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec scripts", + "jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*", "test-spec": "mocha spec/*.spec.js -R spec $(if-node-version 7 echo --harmony-async-await)", "test-fast": "AJV_FAST_TEST=true npm run test-spec", "test-debug": "mocha spec/*.spec.js --debug-brk -R spec", @@ -26,7 +27,7 @@ "build": "del-cli lib/dotjs/*.js && node scripts/compile-dots.js", "test-karma": "karma start --single-run --browsers PhantomJS", "test-browser": "del-cli .browser && npm run bundle-all && scripts/prepare-tests && npm run test-karma", - "test": "npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 4 npm run test-browser", + "test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 4 npm run test-browser", "prepublish": "npm run build && npm run bundle-all", "watch": "watch 'npm run build' ./lib/dot" }, @@ -79,6 +80,7 @@ "glob": "^7.0.0", "if-node-version": "^1.0.0", "js-beautify": "^1.5.6", + "jshint": "^2.9.4", "json-schema-test": "^1.3.0", "karma": "^1.0.0", "karma-chrome-launcher": "^2.0.0",