You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
A common problem that linter-eslint users encounter is getting an error message like Cannot find module 'eslint-plugin-xxxxx'. This is usually because they haven't installed it in the same location as the eslint that linter-eslint is using.
We should catch these errors and give some intelligent instructions on how to fix the problem within the error message. We already know what kind of ESLint they're using, so we should be able to say something like:
Local installation:
The package eslint-plugin-xxxxx is not installed alongside ESLint. Within your project directory, please run npm install --save-dev eslint-plugin-xxxxx.
Global installation:
The package eslint-plugin-xxxxx is not installed alongside your global ESLint. In a terminal, please run npm install -g eslint-plugin-xxxxx.
Fallback ESLint:
You have configured your project to use eslint-plugin-xxxxx, but have not installed ESLint in your project. The fallback version of ESLint installed with linter-eslint does not support eslint plugins. Within your project directory, please run npm install --save-dev eslint eslint-plugin-xxxxx.
I think something like this would prevent a large portion of the issue reports we get on this project.
The text was updated successfully, but these errors were encountered:
I think this idea could certainly extend beyond plugins. This should just be "Better error messages".
The vast majority of runtime errors are due to improper setup on the user end. But in most of those cases we could automatically suggest a fix if we were actually parsing the Error messages.
Seems like the first step here is to start building a list of known errors, along with potential identifying features and causes of the problem. I'll start with your example:
Failure:
Plugin not found
Identifying features:
Throws Cannot find module on require.
Module name matches on /eslint-plugin-/.
Possible causes:
Plugin not installed.
ESLint running from different location than installed plugin.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue Type
Feature Request
Issue Description
A common problem that
linter-eslint
users encounter is getting an error message likeCannot find module 'eslint-plugin-xxxxx'
. This is usually because they haven't installed it in the same location as the eslint thatlinter-eslint
is using.We should catch these errors and give some intelligent instructions on how to fix the problem within the error message. We already know what kind of ESLint they're using, so we should be able to say something like:
Local installation:
Global installation:
Fallback ESLint:
I think something like this would prevent a large portion of the issue reports we get on this project.
The text was updated successfully, but these errors were encountered: