btholt / complete-intro-to-react

A Complete Intro to React, as Given for Frontend Masters
https://frontendmasters.com/learn/react/
MIT License
1.06k stars 927 forks source link

eslint errors - no-extraneous-dependencies #90

Closed jpowell121 closed 7 years ago

jpowell121 commented 7 years ago

I am quickly working through Complete Intro to React, v3 (feat. Redux, Router & Flow) and enjoying it, learning a lot, etc. However, I am getting a consistent eslint error on branch v3-2. Actually two errors….

1:1 error 'react' should be listed in the project's dependencies. Run 'npm i -S react' to add it import/no-extraneous-dependencies

2:1 error 'react-dom' should be listed in the project's dependencies. Run 'npm i -S react-dom' to add it import/no-extraneous-dependencies

I have found I can work around it using a "disable-line" comment such as...

import React from 'react'; // eslint-disable-line import/no-extraneous-dependencies

Is there something else I am missing here that is causing this? Both react and react-dom are in package.json properly.

jpowell121 commented 7 years ago

Closing this since one I have checked out v3-7 I no longer have the issue. Would be interesting to know what cause that in the first place. I saved a local branch to look at it later (or not :) ).