Skip to content
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

object destructuring and object literal notation behave differently #181

Closed
despairblue opened this issue Jul 2, 2015 · 5 comments

Comments

@despairblue
Copy link

commented Jul 2, 2015

const {
  prop1,
  prop2,
} = obj

is allowed but:

const obj = {
  prop1,
  prop2,
}

is a warning. Regard the trailing comma.

@feross

This comment has been minimized.

Copy link
Member

commented Jul 2, 2015

I believe this is a bug in eslint. I filed an issue: eslint/eslint#2911

@feross feross added bug blocked labels Jul 2, 2015

@despairblue

This comment has been minimized.

Copy link
Author

commented Jul 3, 2015

👍

@feross

This comment has been minimized.

Copy link
Member

commented Jul 6, 2015

Bug fixed on eslint master.

@feross

This comment has been minimized.

Copy link
Member

commented Jul 10, 2015

This is fixed in eslint 0.24.1. Run npm update to get the fix.

@feross feross closed this Jul 10, 2015

@despairblue

This comment has been minimized.

Copy link
Author

commented Jul 10, 2015

👏 ty 😃

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.