karma-jshint

0.1.0 • Public • Published

karma-jshint

Code Climate Build Status Dependency Status

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

NPM Package Stats

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.

Package Sidebar

Install

npm i karma-jshint

Weekly Downloads

4

Version

0.1.0

License

none

Last publish

Collaborators

  • philzen