$ yarn add https://github.com/jbox-web/coffeelint-loader.git
In your Webpack configuration:
module.exports = {
test: /\.coffee$/,
loader: 'coffee-lint-loader',
enforce: 'pre',
exclude: /node_modules/
}
You can pass directly some coffeelint options by
- Adding a query string to the loader:
module.exports = {
test: /\.coffee$/,
loader: "coffee-lint-loader?{...}",
enforce: 'pre',
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
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.
You can choose to ignore warnings that are generated by coffeelint by defining a quiet boolean option in the options object.