question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Endless chain of unfound plugins for ESLint

See original GitHub issue
  • kcd-scripts version: 0.25.1
  • node version: 8.6.0
  • npm (or yarn) version: yarn 1.1.0
  • OS: 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.

screen shot 2017-10-13 at 7 41 01 pm

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:

screen shot 2017-10-13 at 7 42 30 pm

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:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
v1adkocommented, Oct 16, 2017

Thank you, I will. And I’ll definitely try to make it work with yarn.

0reactions
kentcdoddscommented, Oct 13, 2017

Try yarn why babel-plugin-jest and npm ls babel-plugin-jest. That’ll tell you what packages require those packages…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Live with Kent: Writing an ESLint plugin - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >
Typescript eslint - Missing file extension "ts" import/extensions
I have installed eslint-plugin-import & eslint-import-resolver-typescript. And I cannot figure out why, I got that error.
Read more >
@typescript-eslint/eslint-plugin | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
12 essential ESLint rules for React - LogRocket Blog
In this post, we'll go over these ESLint rules and plugins, ... such as out-of-date state data or infinite rendering loops can result....
Read more >
eslint-plugin-prettier - npm
This plugin works best if you disable all other ESLint rules relating to code formatting, and only enable rules that detect potential bugs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found