Skip to content

Commit

Permalink
update linting to jsHint
Browse files Browse the repository at this point in the history
  • Loading branch information
hvpulok committed Jan 4, 2017
1 parent 9c8213b commit b2f2200
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 26 deletions.
27 changes: 27 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"mocha": true, // Enable globals available when code is running inside of the Mocha tests.
"jasmine": true, // Enable globals available when code is running inside of the Jasmine tests.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"esnext": true, // Allow ES.next specific features such as `const` and `let`.
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
"curly": false, // Require {} for every new block or scope.
"eqeqeq": true, // Require triple equals i.e. `===`.
"latedef": "nofunc", // Prohibit variable use before definition.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"undef": true, // Require all non-global variables be declared before they are used.
"unused": false, // Warn unused variables.
"strict": true, // Require `use strict` pragma in every file.
"globals": { // Globals variables.
"angular": true,
"io": true,
"ApplicationConfiguration": true
},
"predef": [ // Extra globals.
"inject",
"by",
"browser",
"element"
],
"devel": true // Allow development statements e.g. `console.log();`.
}
11 changes: 9 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,15 @@ gulp.task('eslint', function () {
);

return gulp.src(assets)
.pipe(plugins.eslint())
.pipe(plugins.eslint.format());
// ---using eslint---
// .pipe(plugins.eslint())
// .pipe(plugins.eslint.format());

//---using jsHint---
.pipe(plugins.jshint())
// .pipe(plugins.jshint.reporter('default'))
.pipe(plugins.jshint.reporter('jshint-stylish'));
// .pipe(plugins.jshint.reporter('fail'));
});

// JS minifying task
Expand Down
50 changes: 26 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@
"connect-flash": "~0.1.1",
"connect-mongo": "~1.3.2",
"cookie-parser": "~1.4.1",
"coveralls": "~2.11.6",
"crypto": "0.0.3",
"crypto-js": "^3.1.8",
"del": "^2.2.2",
"eslint": "~2.2.0",
"eslint-config-airbnb": "~6.0.2",
"express": "~4.14.0",
"express-hbs": "^1.0.2",
"express-session": "~1.14.1",
Expand All @@ -60,6 +64,7 @@
"gulp-eslint": "~3.0.1",
"gulp-imagemin": "~3.0.3",
"gulp-istanbul": "~1.1.1",
"gulp-jshint": "^2.0.4",
"gulp-less": "~3.1.0",
"gulp-load-plugins": "~1.3.0",
"gulp-mocha": "~3.0.1",
Expand All @@ -73,14 +78,28 @@
"gulp-uglify": "~2.0.0",
"gulp-util": "~3.0.7",
"helmet": "~2.3.0",
"imagemin-pngquant": "~5.0.0",
"istanbul": "~0.4.2",
"jasmine-core": "~2.5.0",
"jshint": "^2.9.4",
"jshint-stylish": "^2.2.1",
"karma": "~1.3.0",
"karma-chrome-launcher": "~2.0.0",
"karma-coverage": "~1.1.1",
"karma-firefox-launcher": "~1.0.0",
"karma-jasmine": "~1.0.2",
"karma-ng-html2js-preprocessor": "~1.0.0",
"karma-phantomjs-launcher": "~1.0.0",
"lcov-result-merger": "~1.2.0",
"lodash": "~4.16.2",
"lusca": "~1.4.1",
"method-override": "~2.3.5",
"mocha": "~3.1.0",
"mock-fs": "~3.11.0",
"mongoose": "~4.6.2",
"morgan": "~1.7.0",
"multer": "~1.2.0",
"node-inspector": "~0.12.8",
"nodemailer": "~2.6.4",
"owasp-password-strength-test": "~1.3.0",
"passport": "~0.3.2",
Expand All @@ -92,32 +111,15 @@
"passport-paypal-openidconnect": "~0.1.1",
"passport-twitter": "~1.0.4",
"phantomjs-prebuilt": "~2.1.4",
"run-sequence": "~1.2.2",
"semver": "~5.3.0",
"serve-favicon": "~2.3.0",
"should": "~11.1.0",
"socket.io": "^1.4.8",
"supertest": "~2.0.0",
"validator": "~6.0.0",
"winston": "^2.2.0",
"wiredep": "~4.0.0","coveralls": "~2.11.6",
"del": "^2.2.2",
"eslint": "~2.2.0",
"eslint-config-airbnb": "~6.0.2",
"imagemin-pngquant": "~5.0.0",
"istanbul": "~0.4.2",
"karma": "~1.3.0",
"karma-chrome-launcher": "~2.0.0",
"karma-coverage": "~1.1.1",
"karma-firefox-launcher": "~1.0.0",
"karma-jasmine": "~1.0.2",
"karma-ng-html2js-preprocessor": "~1.0.0",
"karma-phantomjs-launcher": "~1.0.0",
"lcov-result-merger": "~1.2.0",
"mock-fs": "~3.11.0",
"node-inspector": "~0.12.8",
"run-sequence": "~1.2.2",
"semver": "~5.3.0",
"should": "~11.1.0",
"supertest": "~2.0.0"
"wiredep": "~4.0.0"
},
"devDependencies": {

}
}
"devDependencies": {}
}

0 comments on commit b2f2200

Please sign in to comment.