Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Parsing error if decorators are applied to methods with computed properties #309

Closed
leonid-bauxy opened this issue May 10, 2016 · 4 comments

Comments

@leonid-bauxy
Copy link

If decorator is applied to the method with computed property key, eslint throws parse error. Is this the correct behavior?

  @autobind
  [method](arg) {
      // do something
  }

Eslint throws error on the first {, saying : Parsing error: Unexpected token.

Latest eslint and babel-eslint

@leonid-bauxy leonid-bauxy changed the title Decorators on computed properties Parsing error if decorators are applied to methods with computed properties May 10, 2016
@hzoo
Copy link
Member

hzoo commented May 12, 2016

This would require a change to babylon to fix the Unexpected token issue if this is valid - shouldn't be too bad

@aaronucsd
Copy link

Borken for me as well with latest 6.0.4 version. Any updates?

@loganfsmyth
Copy link
Member

It's not broken, it has never been supported. This is what @hzoo is trying to say above. We should close this and open an issue in Babylon, the parser Babel uses.

@leonid-bauxy
Copy link
Author

Created an issue in bablylon repo: babel/babylon#33. Closing this one. Thank you, guys!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants