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

static class members cause standard to end parsing #447

Closed
mattwigway opened this issue Mar 3, 2016 · 2 comments

Comments

@mattwigway
Copy link

commented Mar 3, 2016

Standard does not support static class members, à la

export default class RemoveTrips extends Component {
  static propTypes = {
    modification: PropTypes.object.isRequired,
    replaceModification: PropTypes.func.isRequired,
  };
  ...
}

(full file)

When I run standard across this file, I get:

remove-trips.js:17:20: Parsing error: Unexpected token =

and then standard does not find any other errors.

This may be an upstream eslint issue, see yannickcr/eslint-plugin-react#43.

@feross

This comment has been minimized.

Copy link
Member

commented Mar 7, 2016

Thanks for posting to bring to our attention, but like you said, this seems like an upstream issue.

@feross feross closed this Mar 7, 2016

@LinusU

This comment has been minimized.

Copy link
Member

commented Mar 7, 2016

The problem is that you need to use "parser": "babel-eslint", look in the readme for more info

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

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