The easiest way is to keep
karma-jshint-preprocessor as a devDependency in
You can simply do it by:
npm install karma-jshint-preprocessor --save-dev
karma.conf.js file, specify the files you want to have lint'ed in the preprocessor section like this.
Read an optional
jshintrc property from the karma config to force a
.jshintrc file to be used by jshint.
configset// ...jshintPreprocessor:jshintrc: './.jshintrc'// ...;;
Thanks to Kl0tl for adding jshintrc path support.
JSHint configuration is read from a JSON formatted
.jshintrc file within your project
Cancel the current build if a linting error has occurred. This can be useful on CI servers.
configset// ...jshintPreprocessor:stopOnError: true// ...;;
View the full list of JSHint options.
For more information on Karma see the karma homepage.