Skip to content

I'm not getting missing PropType warnings in React 16 #3398

New issue

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

Closed
RyanAtViceSoftware opened this issue Nov 3, 2017 · 1 comment
Closed

I'm not getting missing PropType warnings in React 16 #3398

RyanAtViceSoftware opened this issue Nov 3, 2017 · 1 comment

Comments

@RyanAtViceSoftware
Copy link

Is this a bug report?

Maybe

Can you also reproduce the problem with npm 4.x?

yes

Which terms did you search for in User Guide?

proptypes
eslint

Environment

  1. node -v: v6.5.0
  2. npm -v:5.5.1
  3. yarn --version (if you use Yarn): 0.18.1
  4. npm ls react-scripts (if you haven’t ejected): [email protected]

Then, specify:

  1. Operating system: OSX El Capitain
  2. Browser and version (if relevant):

Steps to Reproduce

  1. create a component with props but with out proptypes for the props
  2. npm start
  3. verify you get no warnings about missing proptypes

Expected Behavior

I'd expect to get warnings about not having proptypes

Actual Behavior

No warnings

@gaearon
Copy link
Contributor

gaearon commented Nov 3, 2017

Create React App never warned about missing PropTypes. You might be thinking about this ESLint rule: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md.

We don't intend to enable it because many people are starting to use Flow for static type analysis instead of runtime PropTypes. You can, however, eject and enable it if you'd like.

@gaearon gaearon closed this as completed Nov 3, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants