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
rule object-shorthand "never" should not complain about destructuring assignment #5488
Comments
Maybe I was too quick to label it as a bug, since I just realized you can also use the long form for destructuring too:
Not sure if this should be an option, though. |
Fix: Ignore destructuring assignment in `object-shorthand` (fixes #5488)
So... there's no way to get the old behaviour? This probably should have been left in as an option. |
Sorry, it's my bad this got merged before we agreed on a decision. :/ @eslint/eslint-team should this rule deal with shorthand in destructuring assignments or is this rule only concerned about object literals? |
Going to reopen this issue. Sorry, my bad for not double-checking issue before merging code change (I actually did a few times and didn't merge the code, but this time around, I forgot). |
👍 to @michaelficarra |
I read the doc, Though I don't have any objection, I'd like to separate it to a new issue. |
Agree with @mysticatea. This rule was checking destructuring by default and it should not have. I'm unsure about an option vs. a new rule, but agree that should be a separate issue. |
Closing then, since this was indeed a bug. |
What version of ESLint are you using?
v2.3.0
What configuration and parser (Espree, Babel-ESLint, etc.) are you using?
Espree
What did you do? Please include the actual source code causing the issue.
What actually happened? Please include the actual, raw output from ESLint.
What did you expect to happen?
Rule object-shorthand "never" should not complain about destructuring assignment. Lines 18 and 22 in the example should not produce error.
The text was updated successfully, but these errors were encountered: