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
Expected property shorthand warning on computed property #6015
Comments
Can you share the config you're using? Do you have the object-shorthand rule turned on? With the information you provided, it looks like you're not using the object shorthand syntax and, assuming you have the rule turned on in your config, this warning is the expected behavior. The shorthand notation would be: const constant = 'foo'
const obj = {
constant
} |
@kaicataldo Look again at the example. The property name is computed. |
Ah, I see. Shouldn't be doing this so late. |
Updated my original comment to add the configuration part that is responsible for object-shorthand. I do not see any issue here. I only encountered this after upgrading to 2.9.0 and I suspect it is related to this e2ad1ec |
PR opened to fix this. |
good |
What version of ESLint are you using?
2.9.0
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint = 6.0.4
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
This should pass or I am missing something on how to do it.
What actually happened? Please include the actual, raw output from ESLint.
warning Expected property shorthand object-shorthand
The text was updated successfully, but these errors were encountered: