Closed ashawley closed 6 years ago
coffeelint 2.0 is for coffeescript 2.0
This is not a coffeelint issue; [stdin] means compiling it caused an error.
Also in CS2 you can no longer call super
bare without paren.
http://coffeescript.org/#try:newMethod%3A%20-%3E%0A%20%20super%0A
Due to a syntax clash with super with accessors, "bare" super (the keyword super without parentheses) no longer compiles to a super call forwarding all arguments.
Ok, good to know. I wondered if it was the case that coffeelint is expecting coffeescript 2.0 code. Thanks for this explanation.
Coffeelint does the right thing with well-formed coffee code:
'Make sure bare super keyword is fine':
topic:
'''
class NewClass
newMethod: ->
super arguments...
'''
'returns no errors': (source) ->
config =
indentation:
level: 'error'
value: 2
errors = coffeelint.lint(source)
assert.isEmpty(errors)
There's no longer a compiler error nor a coffeelint error.
$ npm test
Make sure bare super keyword is fine
✓ returns no errors
Thanks for coffeelint!
I have some coffeescript 1.7 code that uses the
super
keyword. After upgrading from coffeelint 1.16.0 to 2.0.6, it is getting flagged for indentation problems:Here is a unit test: