karma-jshint
v0.1.0
Published
Kind of a Karma plugin. Let JSHint _do_ your code and enjoy the ride...
Downloads
16
Maintainers
Readme
karma-jshint
Preprocessor / Plugin for Karma to check JavaScript syntax on the fly.
Usage
Enabling JSLint'ing of your code files
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']
},
...
Configuration
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
},
...
jshint.options
An object with JSHint config options.
jshint.summary
Show a summary of all jshint'ed files, aggregated across error types.
For more information on Karma see the official Karma runner homepage.