Change Request: Include
ruleId in error message of crash
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:
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.
The text was updated successfully, but these errors were encountered: