Create-react-app: I'm not getting missing PropType warnings in React 16

Created on 3 Nov 2017  路  1Comment  路  Source: facebook/create-react-app

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鈥檛 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

Most helpful comment

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Evan-GK picture Evan-GK  路  3Comments

oltsa picture oltsa  路  3Comments

rdamian3 picture rdamian3  路  3Comments

dualcnhq picture dualcnhq  路  3Comments

stopachka picture stopachka  路  3Comments