karma-coffeelint

0.0.2 • Public • Published

karma-coffeelint

Build Status

NPM Package Stats

A coffeelint plugin for karma.

Installation

npm i karma-coffeelint --save-dev

Add the configure the coffeelint plugin inside your karma config file.

    module.exports = (config) ->

      config.set

        frameworks: ["jasmine"]

        reporters: ["dots", "coverage"]

        files: [
          "src/**/*.coffee"
          "test/**/*.coffee"
        ]

        preprocessors:
          "src/**/*.coffee"    : ["coffeelint", "coffee"]
          "test/**/*.coffee"   : ["coffee"]

        # karma-coffeelint is preconfigured with the following
        # default options.
        coffeelint:
          onStart: false
          onChange: true
          options: 'coffeelint.json'
          reporter:
            type: 'default'
            options:
              colorize: true

        browsers: ["PhantomJS"]

Options

coffeelint options are specified in the karma config file under the key cofeelint.

Name Description
onStart Runs coffeelint on every file when karma starts.
onChange Runs coffeelint on a file change event. Only the modified file is linted
options Path to the coffeelint.json config file relative to the karma file. Or you can specify the coffeelint options directly, see the website for a complete list of coffeelint options.
reporter.type default, jslint, raw, csv, checkstyle
reporter.options low level config options for the coffelint reporter. I'm not sure the options are documented, you can read more in the source.

Default options

defaults = {
  onStart: false,
  onChange: true,
  options: 'coffeelint.json',
  reporter: {
    type: 'default',
    options: {
      colorize: true
    }
  }
};

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request

License

Licensed under the MIT license. See the LICENSE.txt file for more details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    1

Package Sidebar

Install

npm i karma-coffeelint

Weekly Downloads

1

Version

0.0.2

License

none

Unpacked Size

10.1 kB

Total Files

10

Last publish

Collaborators

  • luk3thomas