Endless chain of unfound plugins for ESLint
See original GitHub issuekcd-scripts
version: 0.25.1node
version: 8.6.0npm
(oryarn
) version: yarn 1.1.0OS
: Mac OS Sierra (10.12.6)
What you did:
yarn add -D kcd-scripts
yarn lint:js
-> kcd-scripts lint
What happened:
Basically a series of errors saying that some plugin or config is not found, after I run the lint command.
Problem description:
I’m trying to move my existing project to use CRA for production build (codesplitting, etc.) and kcd-scripts for dev (linting, prettier, precommit) to avoid config bloat and hide all of the webpack + babel mess. CRA was no problem, but as I moved to dev workflow, trying to run kcd-scripts lint resulted in missing some sort of plugin or config. After doing yarn add -D the_missing_thing
and repeating the lint command it spat out anther missing dep and so on. I’ve continued installing more and more of these and each time kcd-scripts lint
took more and more time to run.
I’m currently on my 10th missing module and I don’t think it should be this way 😃
The whole point of the toolkits is to encapsulate dependencies and I get this:
Suggested solution:
I think that eslint
’s module-resolver is scanning all modules in node_modules and pulling their eslint-configs and then it throws when it doesn’t find something. But I’m not sure, it’s a wild guess based from the error and I’m pretty sure kcd-scripts does not need stuff like cssnano
to run.
TBH I don’t know why I even have that in my dependencies, but it’s node - not surprising:)
Thank you for your work @kentcdodds, I really enjoy all of the OSS things you do.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Thank you, I will. And I’ll definitely try to make it work with yarn.
Try
yarn why babel-plugin-jest
andnpm ls babel-plugin-jest
. That’ll tell you what packages require those packages…