lintLine api console.log output in custom rule
dreamalligator opened this issue · 2 comments
dreamalligator commented
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.log
s or console.error
s 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
- custom rule docs: http://www.coffeelint.org/#api
- lintline source: https://github.com/clutchski/coffeelint/blob/master/src/line_linter.coffee#L116
- 3rd party rules guideline: https://github.com/clutchski/coffeelint/blob/master/3rd_party_rules.md
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?
dreamalligator commented
actually, i think it is a chai or mocha issue, thanks! closing