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
Change Request: Include ruleId
in error message of crash
#15037
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
Projects
Comments
AriPerkkio
added
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
triage
An ESLint team member will look at this issue soon
labels
Sep 8, 2021
AriPerkkio
added a commit
to AriPerkkio/eslint
that referenced
this issue
Sep 8, 2021
AriPerkkio
added a commit
to AriPerkkio/eslint
that referenced
this issue
Sep 8, 2021
mdjermanovic
removed
the
triage
An ESLint team member will look at this issue soon
label
Sep 8, 2021
Thanks for the proposal, this seems like something that could be very useful 👍 |
I like it. 👍 |
AriPerkkio
added a commit
to AriPerkkio/eslint
that referenced
this issue
Sep 9, 2021
1 task
AriPerkkio
added a commit
to AriPerkkio/eslint
that referenced
this issue
Sep 12, 2021
nzakas
added
the
accepted
There is consensus among the team that this change meets the criteria for inclusion
label
Sep 15, 2021
Marking as accepted. |
AriPerkkio
added a commit
to AriPerkkio/eslint
that referenced
this issue
Sep 16, 2021
nzakas
pushed a commit
that referenced
this issue
Sep 21, 2021
eslint-github-bot
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Mar 21, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
ESLint version
7.32.0, 8.0.0-beta.1
What problem do you want to solve?
When ESLint rule encounters unexpected error and crashes, the error log should indicate which rule caused the crash. There is already some custom error handling done:
eslint/lib/linter/linter.js
Lines 1213 to 1226 in 143a598
It is important for users to identify which rule is causing linter to crash. This information is used when temporarily disabling the erroneous rule. It is also essential when reproducing and debugging the issue. Users and plugin developers are most interested in the root cause.
Most of the time the stack trace already displays the erroneous rule but there are many cases where it does not. Below are some real examples from stable releases of various eslint plugins.
Rule code is minified
Recursion fills stack trace
Rule is using utilities and third party helpers
Not sure what's going on here
What do you think is the correct solution?
ESLint should include the erroneous rule id in the error logs.
Example of ideal error log. Line 7 is added by this feature. Line numbers are only for demo purpose here.
I have required changes ready for this feature. I'll setup PR if this gets accepted.
Participation
The text was updated successfully, but these errors were encountered: