-
Notifications
You must be signed in to change notification settings - Fork 61
Catch Babel parsing errors #131
Comments
/cc @orta you're using this setup, right? |
Hmm interesting, so it's gotta be something in your local setup @adrianmcli. I don't know what this means or what we should have to change:
Note: I think the wrong offsets are due to #128 (see failing test in #129), any help getting that fixed appreciated too! |
Form the sounds of it, the issue is that an exception is being raised in the babel parser that isn't being caught and returned as an object with the right formatting to say there is an issue. I don't think they ever expect you to be throwing an error, which seems like a reasonable assumption. |
Nope, never seen popups like that - and yeah, I added the TypeScript support for that extension: https://github.com/shinnn/vscode-stylelint/pull/82 I think it's this: an exception is being raised in a babel parser in this lib that isn't being caught and then returned as an object with the right formatting to say there is an issue. I don't think they ever expect you to be throwing an error, which seems like a reasonable assumption |
Okay @orta so you reckon this issue should for example be renamed to "Errors not being caught correctly" and we should add a |
Yep 👍 |
For what it's worth I have the same issue. The moment I start editing a JS file I get a deluge of alerts. It makes this plugin unusable unfortunately as my only option is to remove Javascript from stylelint's list of types. I'm using the same VSCode plugin as the original poster. My
|
Ignore parsing errors, fix #131
When I'm editing
.js
files with the Stylelint plugin in VSCode, I get spammed with popup error messages from babylon.For example:
My
.stylelintrc
:Another user had the same problem here: https://github.com/shinnn/vscode-stylelint/issues/89
According to the author of the plugin, it seems that it's a bug with the processor (hence why I made this issue in this repo). He says it's because this processor does not adhere to the original stylelint behaviour to syntax errors as described here:
I'm completley new to Stylelint and I don't really know how it works, so this is where my research stopped. If anyone has some insight, that would be extremely helpful.
The text was updated successfully, but these errors were encountered: