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
no-useless-rename
fails on spread operators in destructured statements
#6284
Comments
Could you please provide your configuration (at least for the rule), for ease of reproduction? Thanks! Also, for bug reports, please do consider using the issue template that we have provided. It might seem like a pain, but it makes it much easier to triage and troubleshoot bug reports on our side. Thanks! |
My apologies for not following the template. The rule configuration used in my case was the default:
|
Thank you! I agree this seems like a bug- hopefully we can get on it pretty quickly. Ping @mysticatea? |
eslint doesn't support object spread. That is part of a stage 2 proposal. |
I should clarify that I am also using |
This is where the issue template comes in handy :-) |
@EvNaverniouk Can you try this with default parser? We do not maintain P.S. @michaelficarra Object Rest/Spread is the only experimental feature that we support, it's controlled by |
@ilyavolodin That's strange. Why do we make such an exception? |
This issue is reproducible without Command used to test: Contents of
ESLint configuration:
Output:
|
@ilyavolodin @michaelficarra Now that we have a reproduction without babel-eslint, I think we need to accept this issue, unless I'm missing something. For what it's worth, I'm 👍 to avoiding rule crashes where possible. |
@platinumazure Agree. Seems like a valid bug, rules shouldn't just crash. |
Working on this. |
The new
no-useless-rename
rule will fail with:When a spread operator is encountered, such as in this code:
The issue is in the
checkDestructured
function which is expecting aproperties[i].key
to exist. But the ExperimentalSpread AST object does not have akey
defined.The text was updated successfully, but these errors were encountered: