Galooshi / happo

Visual diffing in CI for user interfaces
504 stars 16 forks source link

Many ESLint errors #191

Closed spikebrehm closed 7 years ago

spikebrehm commented 7 years ago

Running npm test l see a bunch of ESLint errors, i.e.:

/Users/spike/code/happo/packages/happo-viewer/src/SideBySide.jsx
  1:34  error  Unable to resolve path to module 'react'  import/no-unresolved
  1:34  error  Missing file extension for "react"        import/extensions

/Users/spike/code/happo/packages/happo-viewer/src/SmoothProgress.jsx
  1:34  error  Unable to resolve path to module 'react'  import/no-unresolved
  1:34  error  Missing file extension for "react"        import/extensions

/Users/spike/code/happo/packages/happo-viewer/src/Swiper.jsx
  1:34  error  Unable to resolve path to module 'react'  import/no-unresolved
  1:34  error  Missing file extension for "react"        import/extensions

/Users/spike/code/happo/packages/happo-viewer/src/uploadLastResult.js
   4:21  error  Unable to resolve path to module 'ejs'         import/no-unresolved
  10:13  error  Unable to resolve path to module 'happo-core'  import/no-unresolved

in total:

✖ 72 problems (66 errors, 6 warnings)

Known issue?

lencioni commented 7 years ago

@spikebrehm Do these errors go away after npm install?

spikebrehm commented 7 years ago

@lencioni nope, they do not. Are you able to reproduce?

trotzig commented 7 years ago

I believe these will all go away after you run lerna bootstrap from the project root.

spikebrehm commented 7 years ago

Yes, lerna bootstrap fixed it!

(I actually ran ./node_modules/.bin/lerna bootstrap because I don't have lerna installed globally.)

What do you think about adding lerna bootstrap as an i.e. postinstall script? My workflow was:

npm i
npm test

and I got the errors. I would expect npm test to pass on a fresh install.

trotzig commented 7 years ago

That might be a good idea, although I don't have much experience working in lerna environments yet. @lelandrichardson might know better, he did all the work to move us over to the current structure.