Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

display rule name in error message #4236

Closed
smollweide opened this issue Oct 19, 2018 · 2 comments
Closed

display rule name in error message #4236

smollweide opened this issue Oct 19, 2018 · 2 comments

Comments

@smollweide
Copy link

First of all thanks a lot for tslint 👍

Something I struggling a lot is that the information about which rules creates the error is missing.
It would be great if the rule name is part of the error message:

currently

ERROR: Parentheses are prohibited around the parameter in this single parameter arrow function

suggestion

ERROR: Parentheses are prohibited around the parameter in this single parameter arrow function (arrow-parens)

That's how eslint did it and it's a really helpful information.

Thank you and best regards,
Simon

@rwaskiewicz
Copy link
Contributor

@smollweide Are you specifying a specific formatter when running the linter? By default, Prose is used and does not have the rule name. It looks like the included Verbose formatter may have what you're looking for?

The human-readable formatter which includes the rule name in messages.
The output is the same as the prose formatter with the rule name included

ERROR: (semicolon) myFile.ts[1, 14]: Missing semicolon

@JoshuaKGoldberg
Copy link
Contributor

Yes, -t verbose or -t stylish would be a resolution for this.

#2228 tracks making that the default, if you're interested!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants