-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
Using this rule:
"react/destructuring-assignment": [
"warn",
"always",
{
"ignoreClassFields": true
}
],
This code:
export default class Thing extends React.Component {
state = {
alpha: false,
beta: this.props.beta,
charlie: null,
};
// ...
}
Generates this warning:
[eslint] Must use destructuring props assignment (react/destructuring-assignment)
Version information:
$ npm ls eslint
@centriam/[email protected] /Users/adam.babcock/Source/cxlint/client
├── [email protected]
├─┬ [email protected]
│ └── [email protected] deduped
└─┬ [email protected]
└── [email protected] extraneous
$ npm ls eslint-plugin-react
@centriam/[email protected] /Users/adam.babcock/Source/cxlint/client
├── [email protected]
└─┬ [email protected]
└── [email protected] extraneous
TimurGrenda and semanser