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 CLI gives no information about exceptions thrown on plugin load #6874
ESLint CLI gives no information about exceptions thrown on plugin load #6874
Comments
In addition, I'm wondering if we want to try to detect if the plugin existed (but threw an exception on require) vs the plugin didn't exist, and modify the pretty message template accordingly. |
Is it only 2.x or does it happen on 3.x as well? |
@pmcelhaney Good question, I'll try to repro with latest and see what happens. Unfortunately the issue can be obscured by the fact that a plugin could fix itself (this only happens when a plugin exists locally but throws when it is require'd by ESLint). So I suppose the best thing I could do is to create a temporary repo representing a bad plugin that could be |
I've been pretty busy with some other issues (both code I'm writing and issues I'm trying to shepherd through), so this has unfortunately fallen by the wayside. I'm hoping to confirm on ESLint 3.x this week and set up a fake plugin repo to prove the issue. If we can keep this open a little while longer, I'd be most grateful. 😄 |
TSC Summary: This issue is accepted, but I wanted to see if this merited being included on the core roadmap project. TSC Question: Should this issue be added to the core roadmap project? |
As per the discussion during today's TSC meeting, this issue has been added to the Core Roadmap. |
@kaicataldo has suggested also solving issue #7668 in this one. So the goal would be for the basic UX to change around plugin errors (i.e., user can tell via pretty exception message whether the plugin didn't exist or it threw an exception); and |
Here's another one 😆 : #6976 |
Previously, if a plugin threw an error on load, ESLint would display the "missing plugin" error message. This was confusing for plugin developers, because it would be difficult to distinguish between an installation error and a broken plugin.
What version of ESLint are you using?
2.13.1 (with eslint-plugin-react 6.0.0)
What parser (default, Babel-ESLint, etc.) are you using?
Default (this shouldn't matter)
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
Plugin loads successfully, or if it fails to load, the exception thrown should show up in
eslint --debug
.What actually happened? Please include the actual, raw output from ESLint.
With no indication of why the plugin failed to load. In this case, it wasn't due to the plugin not being available, but rather the
require()
failed due to something wrong with the plugin's main file.The text was updated successfully, but these errors were encountered: