coffee-lint-loader

0.0.1 • Public • Published

Coffeelint loader for Webpack

Install

$ npm install coffee-lint-loader

Usage

In your Webpack configuration:

module.exports = {
    // ...
    module: {
        preLoaders: [
            {
                test: /\.coffee$/,
                loader: "coffee-lint-loader",
                exclude: /node_modules/
            }
        ]
    }
    // ...
}

Options

You can pass directly some coffeelint options by

  • Adding a query string to the loader:
{
  module: {
    loaders: [
      {
        test: /\.coffee$/,
        loader: "coffee-lint-loader?{...}",
        exclude: /node_modules/,
      },
    ],
  },
}
  • Adding an coffeelint entry in you webpack config for global options:
module.exports = {
    coffeelint: {
        configFile: 'path/.coffeelint'
    }
}

Note that you can use both method in order to benefit from global & specific options

Custom reporter

A reporter will provide as default. However, if you prefer a custom reporter, you can define a reporter in the options object. The reporter function will be passed an array of violations generated by coffeelint. See coffeelint api. The context of the reporter will be set to the same context as Webpack loaders. See webpack loader context

Quiet Mode

You can choose to ignore warnings that are generated by coffeelint by defining a quiet boolean option in the options object.

License

Package Sidebar

Install

npm i coffee-lint-loader

Weekly Downloads

6

Version

0.0.1

License

MIT

Last publish

Collaborators

  • lewie9021