[Code Style] Add JSHint rules

Add JSHint rules to complement allowing multiple var statements,
https://github.com/nasa/openmct/issues/142#issuecomment-212187972

[Code Style] Require one decl per var

[Code Style] Don't require separate var decls

...but allow them (for compatibility with existing code style)

[Code Style] Allow var decl after start of scope

[Code Style] Enforce codestyle during verify task
This commit is contained in:
Victor Woeltjen 2016-05-12 15:32:38 -07:00
parent 116c6e57ed
commit 031a46aa8e
3 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,5 @@
{
"preset": "crockford"
"preset": "crockford",
"requireMultipleVarDecl": false,
"requireVarDeclFirst": false
}

View File

@ -5,7 +5,7 @@
"eqeqeq": true,
"forin": true,
"freeze": true,
"funcscope": true,
"funcscope": false,
"futurehostile": true,
"latedef": true,
"noarg": true,
@ -16,6 +16,7 @@
"define",
"Promise"
],
"shadow": "inner",
"strict": "implied",
"undef": true,
"unused": "vars"

View File

@ -147,6 +147,6 @@ gulp.task('develop', ['serve', 'stylesheets', 'watch']);
gulp.task('install', [ 'static', 'scripts' ]);
gulp.task('verify', [ 'lint', 'test' ]);
gulp.task('verify', [ 'lint', 'test', 'checkstyle' ]);
gulp.task('build', [ 'verify', 'install' ]);