Formatters sometimes omit important info from parser error messages #9154
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
bug
ESLint is working incorrectly
core
Relates to ESLint's core APIs and features
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
(no configuration)
What did you do? Please include the actual source code causing the issue.
I linted an invalid piece of JavaScript text which only consists of a single dot:
.
What did you expect to happen?
I expected a parser error including the message
Unexpected token .
What actually happened? Please include the actual, raw output from ESLint.
The
stylish
andcodeframe
formatters strip trailing.
characters from report messages, presumably for stylistic reasons. However, this leads to confusing messages when the.
is actually an important component of the message, rather than a period at the end of the sentence.One way to address this would be to avoid removing the trailing
.
forfatal
messages. Another solution would be to just stop removing trailing.
characters entirely.The text was updated successfully, but these errors were encountered: