PropTypes.elementType is marked as error
See original GitHub issueUsing PropTypes.elementType with prop-types and eslint-react-plugin latest versions is being marked as error:
Typo in declared prop type: elementType eslint(react/no-typos)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
PropTypes.elementType is marked as error #2368 - GitHub
Using PropTypes.elementType with prop-types and eslint-react-plugin latest versions is being marked as error: Typo in declared prop type: ...
Read more >How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism for adding type checking to component props.
Read more >React PropType is not giving error when isRequired is used
Hi, have you checked the browser console? proptypes throws errors there, it doesn't show anything on the actual browser view port.
Read more >Typechecking With PropTypes - React
To run typechecking on the props for a component, you can assign the special propTypes property: import PropTypes from 'prop-types'; class Greeting extends ......
Read more >How To Use PropTypes In React - Web Dev Simplified Blog
PropTypes is a tool in React that lets you validate the structure and type of all your props and if there are any...
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
This is the same issue as https://github.com/yannickcr/eslint-plugin-react/issues/2188#issuecomment-468991235, so I’m really not sure what’s happening.
Note, you may have duplicate prop-types libs in your graph; don’t just open up the package.json, check your lockfile, and try
npm ls | grep prop-types
I’m going to close this as a duplicate of https://github.com/yannickcr/eslint-plugin-react/issues/2188#issuecomment-468991235.
As long as you have a
prop-types
installed that haselementType
, this plugin will pick it up.