-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESLint 6.0.0-alpha.1
has a confusing error message for some plugins that crash on load
#11720
Comments
Hi, thanks for the report. What happens if you use |
Thank you for your report! At a glance, the reason is that those plugins import internal files like https://github.com/benmosher/eslint-plugin-import/blob/master/src/ExportMap.js#L7. (Sorry, I have not seen details because I'm on mobile now) |
@mysticatea where would |
You can use |
As an aside, if this is caused by However, I can't reproduce this bug locally. |
If that works down to eslint 2, then I can certainly switch the import plugin to use the public mechanism :-) |
Yes, as far as I can tell it does work down to ESLint 2 (see here). |
I'm on PC. I could reproduce it, but it was caused by importing an internal file of ESLint. The error was: Because the |
Thanks; I’ll look into replacing that one too. |
@mysticatea To clarify, does the error produce the "plugin-missing" message for you? If so, we should fix the error message to produce the stack trace directly. If not, I think we still need to investigate why @ehmicky is getting a "plugin-missing" error. |
I will do:
|
6.0.0-alpha.1
crashes when loading some plugins6.0.0-alpha.1
has a confusing error message for some plugins that crash on load
Thanks everyone for looking into this! 🙏 I created a demo repository to make it easier to reproduce. I noticed that if a parent directory has a
|
Thanks for fix @not-an-aardvark and @mysticatea! I just tried it and it does seem to fix the problem. Or more precisely: it now throws another error described here but it's specific to |
I managed to reproduce a very similar bug but with I've opened an issue on |
I noticed that eslint wasn't working after some of the upgrades. I suspect that this is due to eslint 6 itself and different ways in which it tries to access plugins. In particular, it seems to have a big problem trying to inherit settings from a parent folder where there's no actual node project (with the modules installed that that parent config would need). I wasn't able to find a place that comes right out and said the way we were doing things was once supported and now isn't, but reading links like the following: https://eslint.org/docs/user-guide/migrating-to-6.0.0#-plugins-and-shareable-configs-are-no-longer-affected-by-eslints-location eslint/eslint#11720 make me wonder if we were relying on accidental behaviour to begin with. In any event, the extra configuration on .vscode's eslint plugin plus moving to specific .eslintrc.js files for both the client and the server causes eslint to again operate properly. Given the fuzziness around the behaviour we were exploiting, it seems better to do this small amount of duplication rather than roll back the package and avoid the inevitable for a while longer.
Tell us about your environment
6.0.0-alpha.1
(6.0.0-alpha.0
does not produce this bug)12.2.0
6.9.0
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
package.json
:package-lock.json:
file.js
:Then:
What did you expect to happen?
ESLint should not crash.
What actually happened? Please include the actual, raw output from ESLint.
ESLint crashed.
Additional information
A similar bug happened with
eslint-plugin-html
.I initially posted to
eslint-plugin-import
and @ljharb recommended me to post this here.Also it seems like when I move the root directory from
/home/ehmicky/
to/home/ehmicky/Desktop/
, the bug does not appear. I am not sure why.(edited by @not-an-aardvark to put
package-lock.json
behind a dropdown)The text was updated successfully, but these errors were encountered: