I\'m setting up a new React with the help of: https://github.com/facebookincubator/create-react-app
However, I\'m running into a linting issue. I\'m receiving the fo
If you're using <script> tags
; you can add this tag:
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.7.2/prop-types.min.js" integrity="sha512-ssNhh7jlzc+K93ckIlSXFHHz6fSFv0l619WOv8xbFNRbFOujbasb42LVMOggDrQR1ScJncoWb+KAJx1uF3ipjw==" crossorigin="anonymous"></script>
You can get the minified/non-minified
and other version
here
Good Luck...
According to this issue comment.
It appears to be because you have installed eslint 4.x
when you should just use the eslint version that is shipped with create-react-app. You should remove any eslint you have manually installed and use the one that comes with the repo.
Please install the prop-types npm package - react 1.15 and greater on separate package is created.
Here to install package
You can place the PropTypes just after the class (outside the class):
Routers.propTypes = {
history: PropTypes.object.isRequired
}
Please Install prop-types
using this code : npm install --save prop-types
Since react 15.5, PropTypes is included in a separate package, 'prop-types'. So this line will help
import PropTypes from 'prop-types'
You can read more here