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

Allow setting jsx pragma value in eslintrc #80

Closed
dominicbarnes opened this issue May 21, 2015 · 3 comments · Fixed by #82
Closed

Allow setting jsx pragma value in eslintrc #80

dominicbarnes opened this issue May 21, 2015 · 3 comments · Fixed by #82

Comments

@dominicbarnes
Copy link
Contributor

I'm using jsxPragma: 'dom' with my babel config. (so I don't need to manually add that pragma to each file) However, now my dom var appears unused, and there doesn't appear to be any config to set this value in the .eslintrc.

I'm not using React, but since the jsx pragma itself is supported for what appears to be other non-React users, I'm hoping this can be done. :)

@yannickcr
Copy link
Member

I was not aware of this possibility with babel, I think we can add an option for jsx-uses-react like:

{
  "jsx-uses-react": [1, {
    "pragma": "dom"
  }]
}

@dominicbarnes
Copy link
Contributor Author

That would be amazing! Thanks :)

yannickcr added a commit that referenced this issue May 28, 2015
Add support for setting the jsx pragma value in eslintrc (fixes #80)
@kevinrenskers
Copy link

I'm also not using React, but this project is still extremely useful. One more rule that could benefit from the same sort of config would be "react-in-jsx-scope". Instead of having a hardcoded id of "React", it would be great to make this configurable as well.

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

Successfully merging a pull request may close this issue.

3 participants