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

button-has-type mistakenly says "null" in its error message #1874

Closed
lydell opened this issue Jul 3, 2018 · 0 comments
Closed

button-has-type mistakenly says "null" in its error message #1874

lydell opened this issue Jul 3, 2018 · 0 comments
Labels
bug

Comments

@lydell
Copy link

@lydell lydell commented Jul 3, 2018

Extracted from #1555 (comment)

// index.js
<button type={foo}>test</button>
$ eslint index.js 

/home/lydell/stuff/eslint/index.js
  1:1  error  "null" is an invalid value for button type attribute  react/button-has-type

✖ 1 problem (1 error, 0 warnings)
// .eslintrc.js
module.exports = {
  parserOptions: {
    ecmaVersion: 2018,
    ecmaFeatures: {
      jsx: true
    }
  },
  plugins: ["react"],
  rules: {
    "react/button-has-type": "error"
  }
}
// package.json
{
  "private": true,
  "dependencies": {
    "eslint": "5.0.1",
    "eslint-plugin-react": "7.10.0"
  }
}
@ljharb ljharb added the bug label Jul 3, 2018
@ljharb ljharb closed this in be2ec76 Jul 3, 2018
This was referenced Sep 22, 2018
@renovate renovate bot mentioned this issue Nov 14, 2018
0 of 1 task complete
@renovate renovate bot mentioned this issue Dec 5, 2018
0 of 1 task complete
@renovate renovate bot mentioned this issue Dec 17, 2018
0 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.