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

Add jsx to parserOption.ecmaFeatures #1

Open
TimNN opened this issue Feb 26, 2016 · 0 comments
Open

Add jsx to parserOption.ecmaFeatures #1

TimNN opened this issue Feb 26, 2016 · 0 comments

Comments

@TimNN
Copy link

TimNN commented Feb 26, 2016

Hi, I'm pretty new to using eslint so I'm still trying to find my way around.

I've been using this and eslint-config-canonical with the following .eslintrc.yml:

---
  extends:
    - "eslint-config-canonical"
    - "eslint-config-canonical-react"

Which produced the following error:

  14:5  error  Parsing error: Unexpected token <

which was caused by an opening jsx tag.

I fixed this problem by adding

  parserOptions:
    ecmaFeatures:
      jsx: true

to my .eslintrc (note the parserOptions) as mentioned in the eslint documentation.

I don't know if there is a reason that this is not included in this config, but if there is none, I believe that is should be added to this config.

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

No branches or pull requests

1 participant