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

False positive for react/button-has-type #1847

Closed
remcohaszing opened this issue Jun 25, 2018 · 1 comment
Closed

False positive for react/button-has-type #1847

remcohaszing opened this issue Jun 25, 2018 · 1 comment

Comments

@remcohaszing
Copy link
Contributor

The following code triggers react/button-has-type.

document.createElement('button')

The culprit is in this function: https://github.com/yannickcr/eslint-plugin-react/blob/master/lib/rules/button-has-type.js#L15..L20

This should also check for the pragma setting.

@ljharb
Copy link
Member

ljharb commented Jun 25, 2018

It should definitely check for the pragma setting, altho I’m not sure why you’d ever be creating DOM elements in a React application. Thanks!

alexzherdev pushed a commit to alexzherdev/eslint-plugin-react that referenced this issue Jun 26, 2018
alexzherdev added a commit to alexzherdev/eslint-plugin-react that referenced this issue Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants