Closed hoIIer closed 8 years ago
CoffeeScript doesn't support ES6 modules, so what have there is a syntax error.
If CoffeeScript won't parse it there's no way CoffeeLint is going to lint it. If somehow your code does compile because you're using some fork of CoffeeScript you can try https://github.com/clutchski/coffeelint/blob/master/doc/user.md#what-about-different-flavors-of-coffeescript-like-icedcoffeescript
Just checking in here now that CoffeeScript does in fact support ES6 modules for about a year. What steps would I need to take in order to convince my linter it's all gonna be okay? ;-)
@AsaAyers
I'd be grateful for pointers regarding proper syntax support, or silencing this very specific check. Easiest solution probably involves telling Coffeelint about the CS version I'd prefer it to use?
@swang runs this project now.
My sincere suggestion is to use http://decaffeinate-project.org/ to move any project you have to JavaScript, and then replace CoffeeScript with https://babeljs.io/, and replace CoffeeLint with https://eslint.org/. There just aren't many benefits to using CoffeeScript vs JavaScript with Babel. See You don't need CoffeeScript for more details.
If you install CoffeeLint and CoffeeScript locally (npm install --save-dev coffeelint coffee-script
), then CoffeeLint will use that local CoffeeScript.
Coffeescript 2 is published on NPM under coffeescript
without the dash to not cause accidental upgrades between versions 1 and 2. Unfortunately, that means it is not picked up automatically by Coffeelint as far as I can tell.
I guess I was asking for an easy way to configure which executable to use!
edit
To clarify, I'm seeing this with both coffeescript
and coffee-script
packages installed globally (for various projects I require either 1 or 2 be present) and with coffeelint
installed globally under a different --prefix
.
Hello, I am trying out coffeelint with my ember-cli project and have an error being thrown for the es6 import in my files... How can I have coffeelint ignore this?
image