A Karma plugin. Check Syntax of JavaScript using JSHint.

npm install karma-jshint-preprocessor
14 downloads in the last day
85 downloads in the last week
539 downloads in the last month


Code Climate Dependency Status

Preprocessor / Plugin for Karma to check JavaScript syntax on the fly.

NPM Package Stats


The easiest way is to keep karma-jshint-preprocessor as a devDependency in your package.json.

  "devDependencies": {
    "karma": "~0.10",
    "karma-jshint-preprocessor": "~0.1"

You can simply do it by:

npm install karma-jshint-preprocessor --save-dev


In your karma.conf.js file, specify the files you want to have lint'ed in the preprocessor section like this.

preprocessors: {
  '*.js': ['jshint']

JSHint configuration is read from a JSON formatted .jshintrc file within your project

Example .jshintrc file.
    "undef": true,
    "globals": {
        "angular": true

View the full list of JSHint options.

For more information on Karma see the karma homepage.

npm loves you