react/no-typos emit false error.
See original GitHub issueThis rule fails only on external proptypes declaration. Using static class field propTypes works fine.
// validators.js
import PropTypes from 'prop-types';
export const validator = PropTypes.shape({ ... });
// Component.jsx
import { validator } from 'validators';
function Component({ value }) { ... }
Component.propTypes = {
value: validator.isRequired,
// ^-----------^ - Typo in declared prop type: isRequired (react/no-typos)
};
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
react/no-typos emit false error. · Issue #1738 - GitHub
This rule fails only on external proptypes declaration. Using static class field propTypes works fine. // validators.js import PropTypes ...
Read more >Get strange React propTypes error even it works in another ...
Line 282:20: Typo in declared prop type: boolean react/no-typos. Search for the keywords to learn more about each error.
Read more >Error Boundaries - React
Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.
Read more >Render Sub-component Error in React.js using Error Boundaries
Error boundaries are normal React components that act as a wrapper to catch the errors from the child components. A component can simply...
Read more >API Reference - Formik
Form validation errors. Should match the shape of your form's values defined in initialValues . If you are using validationSchema (which you should...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I use immutable.js extensively accross my apps. I get errors on ImmutablePropTypes.map and ImmutablePropTypes.list
Please help. Currently it breaks my build, so I will mute this rule until you fix it
I’ve looked into this, but I’m unable to reproduce with the following test case (which produces no errors):