-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
adding support for setting the jsx pragma value via config #82
Conversation
Although outside the scope of this PR, the rule name I was thinking it could be named |
Thanks :) But actually I'd prefer to keep the |
|
||
var Hello = <div>Hello {this.props.name}</div>; | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Just some little things: can you make a Rule Options section and use the same format as the other rules for the config file example ?
You can see an example here: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-prop-types.md#rule-options
4822162
to
82b7063
Compare
I'm done making those changes! Let me know if there are any other changes to make |
LGTM. Thanks! |
Add support for setting the jsx pragma value in eslintrc (fixes #80)
This fixes #80
Instead of taking the approach mentioned there, this turned out to be far less complicated, it basically adds a second config option to the
react/jsx-uses-react
rule:This causes
dom
to be used in place ofReact
as the used variable. I've also included a test and updated the docs for the aforementioned rule.Let me know if there's anything else we need to do to get this merged! :D