We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
You get this runtime warning:
warning: propTypes was defined as an instance property on MyComponent. Use a static property to define propTypes instead.
when you forget to make the propTypes static like this:
propTypes
class MyComponent extends React.PureComponent { propTypes = { text: PropTypes.string, } }
The new rule could detect non-static propTypes inside class definitions and report them by default as warning.
The text was updated successfully, but these errors were encountered:
This seems like something no-typos should be handling.
no-typos
Sorry, something went wrong.
Indeed, no-typos already handled this over a year before this was filed (see #1209)
No branches or pull requests
You get this runtime warning:
warning: propTypes was defined as an instance property on MyComponent. Use a static property to define propTypes instead.
when you forget to make the
propTypes
static like this:The new rule could detect non-static
propTypes
inside class definitions and report them by default as warning.The text was updated successfully, but these errors were encountered: