-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] TypeError: Cannot read property 'replace' of undefined Occurred while linting #2118
Comments
Thanks! Any idea what code it's crashing on? |
ah, i see - when you have |
Wasn't a invalid syntax itself, while I'm typing that error occurs. I don't know if have to be considered a invalid syntax while typing. The error throws on cases like this: import
function Component(props) {
return (
<div>
My Component
</div>
);
}
export default Component; An interesting thing about this is that the error only throw when I type the last character, the "t". But I don't get it, is that a real bug or am I missing something? |
It's not really a bug - it's more of an unintended consequence of your editor trying to run the linter on code that isn't actually valid syntax, which is why I couldn't add a regression test for it. |
I see. Any tip of what could be happening? I have more projects that run this eslint plugin, on all of them I use the same editor and only one of them pops up that annoying error. |
No idea - but the next release will include this fix anyways |
I'm getting an annoying error that occurs every time I type the word
import
.THis error pops up on the right bottom corner of the VS code:

I've disabled my eslint plugins one by one until I realize that this error only occurs only when I have this plugin o the plugin list.
Versions:
Editor: VS Code 1.56.2
Eslint: 7.27.0
Eslint extension: 2.1.20
eslint-plugin-import: 2.23.4
The text was updated successfully, but these errors were encountered: