We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
forbid-prop-types
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
forbid-prop-types does not work when propTypes are declared using an es6 static member:
static get propTypes() { return { store: PropTypes.object.isRequired, history: PropTypes.object.isRequired, DevTools: PropTypes.func.isRequired }; }
...however, display-name still works correctly, when using a similar es6 notation:
display-name
static get displayName() {return 'Root';}
The text was updated successfully, but these errors were encountered:
I suppose both rules work with the following syntax (sans getter):
static displayName = 'Root'; static propTypes = { store: PropTypes.object.isRequired, history: PropTypes.object.isRequired, DevTools: PropTypes.func.isRequired };
Sorry, something went wrong.
I think this should work now: https://github.com/yannickcr/eslint-plugin-react/blob/master/tests/lib/rules/forbid-prop-types.js#L794
Looks like #1533 fixed this.
No branches or pull requests
forbid-prop-types
does not work when propTypes are declared using an es6 static member:...however,
display-name
still works correctly, when using a similar es6 notation:The text was updated successfully, but these errors were encountered: