JSPM

browserify-coffeelint

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q28291F
  • License ISC

Simple browserify 'transform' to lint coffeescript files

Package Exports

  • browserify-coffeelint

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browserify-coffeelint) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Browserify Coffeelint transform

This simple 'transform' enables to integrate your coffeelint with browserify. This makes for a simpler watch, and only lints what you acutally use. Especially good with watchify.

Install

npm install browserify-coffeelint --save-dev

Use

Just use as normal transform. Transform options are passed through as coffeelint options.

browserify -t browserify-coffeelint -t coffeeify main.coffee -o bundle.js

Config

It automatically looks for coffeelint.json in the default places (since 1.1.0). To generate such a file, execute:

coffeelint --makeconfig > coffeelint.json

It is also possible to set (/overide) these settings using browserify options.

Example using package.json:

"browserify": {
  "transform": [
    [
      "browserify-coffeelint",
      {
        "arrow_spacing": {
          "name": "arrow_spacing",
          "level": "error"
        }
      }
    ]
  ]
}

Example using programmatic API:

browserify            = require 'browserify'
browserify_coffeelint = require 'browserify-coffeelint'
coffeeify             = require 'coffeeify'

options =
  arrow_spacing:
    name:  'arrow_spacing'
    level: 'error'

browserify()
.add 'main.coffee'
.transform browserify_coffeelint, options
.transform coffeeify
.bundle()
.pipe process.stdout

Options

Thanks to @nmccready, it is also possible to fail on error or warning. Just pass the options doEmitErrors or doEmitWarnings.