reactjs - 'Proptypes' is not defined -


i'm setting new react of: https://github.com/facebookincubator/create-react-app

however, i'm running linting issue. i'm receiving following linting error 'proptypes' not defined. (no-undef).

here code causing issue:

import react, { component } 'react'; import proptypes 'prop-types';  class routers extends component {   static proptypes = {     history: proptypes.object.isrequired   };  ... 

i tried playing around react/prop-types rule, no avail.

according issue comment.

it appears because have installed eslint 4.x when should use eslint version shipped create-react-app. should remove eslint have manually installed , use 1 comes repo.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -