Skip to content

Philzen/karma-jshint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Check Syntax of JavaScript using JSHint.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%