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.

"ESLint couldn't find the plugin" notice loses a last character

See original GitHub issue

Tell us about your environment

  • ESLint Version: 6.8.0
  • Node Version: 12.0.0
  • npm Version: 6.14.4

What parser (default, Babel-ESLint, etc.) are you using?

Not relevant, but "@typescript-eslint/parser"

Please show your full configuration:

Configuration
module.exports = {
  extends: [
    "plugin:eslint-config-prettier",
  ],
};

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

eslint --print-config ./eslintrc.js

What did you expect to happen?

The module name being reported as not existing should be … eslint-config-prettier, I’m guessing?

What actually happened? Please include the actual, raw output from ESLint.

Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the plugin "eslint-plugin-eslint-config-prettie".

(The package "eslint-plugin-eslint-config-prettie" was not found when loaded as a Node module from the directory "C:\Code\tslinttest".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install eslint-plugin-eslint-config-prettie@latest --save-dev

The plugin "eslint-plugin-eslint-config-prettie" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

This issue split from: https://github.com/typescript-eslint/tslint-to-eslint-config/issues/439.

Are you willing to submit a pull request to fix this bug?

I’d love to! 🤗

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
yeonjuancommented, May 4, 2020

Hi @JoshuaKGoldberg 😃 Thanks for the reporting. 😀

It seems a bug to me; I agree that the error message should be improved

The module name being reported as not existing should be … eslint-config-prettier, I’m guessing?

Maybe not, 🤔 because the actual reason is incorrect configuration.

"plugin:eslint-config-prettier",

The “plugin:xxx” means the use of exported configuration from other plugins. so it should be consists of "plugin:" + {package name} + "/" + {configuration name}

The extends property value can consist of:

  • plugin:
  • the package name (from which you can omit the prefix, for example, react)
  • /
  • the configuration name (for example, recommended)

https://github.com/eslint/eslint/blob/015edf6467e33c67b904db037a674d71957a6865/lib/cli-engine/config-array-factory.js#L804

the problem is here. there is no ‘/’ character in extendName so lastIndexOf return -1;

1reaction
eslint-deprecated[bot]commented, Jul 26, 2020

Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint"
Solution was simply to upgrade to the latest version of eslint.
Read more >
eslint/eslint - Gitter
ESLint couldn't find the plugin "eslint-plugin-react-hooks". This can happen for a couple different reasons: 1. If ESLint is installed globally, ...
Read more >
@typescript-eslint/eslint-plugin | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
VS Code API | Visual Studio Code Extension API
Represents a related message and source code location for a diagnostic. This should be used to point to code locations that cause or...
Read more >
ESLint couldn't find the plugin “eslint-plugin-@typescript-eslint”
Javascript – ESLint couldn't find the plugin “eslint-plugin-@typescript-eslint” · Native deep cloning · Fast cloning with data loss - JSON.parse/stringify.
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