clutchski/coffeelint

lintLine api console.log output in custom rule

dreamalligator opened this issue · 2 comments

Hi, I searched through the documentation and issues, but couldn't find explanation on this, so sorry if this is a repeat.

When creating a new custom rule, why doesn't my console.logs or console.errors print to terminal?

A simple example would probably be the following:

module.exports = class MyCoffeelintRule

  rule:
    name: 'my_coffeelint_rule'
    level: 'error'
    message: '...'
    description: '''
      This rule does nothing.
      '''

  lintLine: (line, lineApi) ->
    console.log line, lineApi # <----  here
    true
swang commented

the only thing i can think of is you're not installing the module globally so coffeelint cannot see it.

how are you loading it?

actually, i think it is a chai or mocha issue, thanks! closing