Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

jbox-web/coffeelint-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coffeelint loader for Webpack

GitHub license

Install

$ yarn add https://github.com/jbox-web/coffeelint-loader.git

Usage

In your Webpack configuration:

module.exports = {
  test: /\.coffee$/,
  loader: 'coffee-lint-loader',
  enforce: 'pre',
  exclude: /node_modules/
}

Options

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

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.

Quiet Mode

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