question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PropTypes.elementType is marked as error

See original GitHub issue

Using 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:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ljharbcommented, Aug 3, 2019

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

0reactions
ljharbcommented, Oct 1, 2019

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 has elementType, this plugin will pick it up.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found