Preprocessor / Plugin for Karma to check JavaScript syntax on the fly.
In your Karma config file (nowadays commonly named karma.conf.js
),
specify the files you want jslint'ed in the preprocessor section like this:
...
preprocessors: {
...
'./src/**/*': ['jshint']
},
...
You may set your own options by adding a jshint
section
to your Karma config file, for example :
...
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
devel: true,
eqnull: true,
browser: true,
globals: {
cordova: true,
jQuery: true
}
},
summary: true
},
...
An object with JSHint config options.
Show a summary of all jshint'ed files, aggregated across error types.
For more information on Karma see the official Karma runner homepage.