-
-
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
jsx-uses-vars rule doesn't work with ES6 class #96
Comments
I have the same error. I used the following versions of the libraries: Code: 'use strict';
import React from 'react';
class HelloMessage extends React.Component {
render() {
return <p>HelloWorld!</p>;
}
}
React.render(<HelloMessage />, document.body);
{
"parser": "babel-eslint",
"plugins": [
"react"
],
"rules": {
"strict": 0,
"global-strict": 0,
"quotes": [1, "single", "avoid-escape"],
"react/display-name": 0,
"react/jsx-boolean-value": 1,
"react/jsx-no-undef": 1,
"react/jsx-quotes": 1,
"react/jsx-sort-prop-types": 1,
"react/jsx-sort-props": 1,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-multi-comp": 1,
"react/no-unknown-property": 1,
"react/prop-types": 1,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/sort-comp": 1,
"react/wrap-multilines": 1
},
"env": {
"browser": true,
"es6": true
},
"ecmaFeatures": {
"jsx": true,
"modules": true
}
}
I tried to find the root of the problem and it turned out that for the simplest case: class A {};
<App />; there are two variables with name |
With
[email protected]
&[email protected]
$ cat hello.jsx
$ cat .eslintrc
$ eslint hello.jsx
Is that a bug of this plugin?
The text was updated successfully, but these errors were encountered: