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
[Fix] guard against empty parent #2832
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We’d need a regression test to land this - can you figure out which code is crashing?
Absolutely, but I don't know how to go about this, I get this crash for parents with type The crash looks like this: TypeError: Cannot read properties of undefined (reading 'indexOf') |
What's on line 18 of that tsx file? |
We have a bunch of namespaced classes which we rename and re-export in this way. |
woof, that is some gnarly TS syntax :-) i know about |
Although in this case, the rule should presumably be enforcing a newline after the |
To be honest, I don't know. |
aha, #1830 indeed attempts to ignore them, treating them as exports rather than imports. In this case, it sounds like the right bug fix, as long as there's a regression test. |
Thanks for the help and feedback in getting this merged! |
Without this fix I get a crash on my current linting set-up.
Not sure what is causing the parent to be empty, might be a bug in the parser, but I ran into this updating everything to the latest versions.