clutchski / coffeelint

Lint your CoffeeScript.
http://www.coffeelint.org
Other
1.17k stars 172 forks source link

Last update broke splats #635

Open jhessin opened 6 years ago

jhessin commented 6 years ago

The latest update fixed the issue with computed object keys #633 but it seems to have broken splats

data.push { doc.data()..., id: doc.id }

Now gives me a coffeescript_error

NOTE: I have tested this code using the latest coffeescript and it works fine.

swang commented 6 years ago

coffeescript_error occurs when there is a parsing error in coffeescript itself.

What does coffee -v return for you? it is possible you the version your environment is using does not support splats.

jhessin commented 6 years ago

You misunderstood. CoffeeScript isn’t giving me the error - only coffelint is.

swang commented 6 years ago

To clarify, the error and the error from #633 you are seeing was generated because coffeelint was unable to parse the coffeescript it was trying to lint, that is what coffeescript_error means. coffeelint can't lint something that's not parseable by the version of coffeescript it's using.

This bit of code seems to run fine for me with the latest version of coffeelint. So either there is some weird override happening, or the coffeescript in the library is being ignored or something didn't get updated.

Knowing what version of coffee and coffeelint your environment is seeing would help clarify what's going on. Do you also have a package-lock.json file?

jhessin commented 6 years ago

This may be an issue with my editor. It seems to have downgraded coffeelint to 2.0.7 without my permission.