Skip to content
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

Improve report location of no-trailing-spaces by specifying end location #12315



Copy link

@golopot golopot commented Sep 26, 2019

What rule do you want to change?

Does this change cause the rule to produce more or fewer warnings?

How will the change be implemented? (New option, new default behavior, etc.)?
Change report location by adding end location.

Please provide some example code that this change will affect:

/* eslint no-trailing-spaces: 2*/
// trailing spaces

What does the rule currently do for this code?
Only reports the start location but not end location. Therefore my editor only display one tilde instead of many tildes covering all trailing spaces.

What will the rule do after it's changed?
The report location will have both start location and end location.

Are you willing to submit a pull request to implement this change?


This comment has been minimized.

Copy link

@mdjermanovic mdjermanovic commented Sep 26, 2019

Hi @golopot , thanks for the issue!

I can confirm that the rule reports only the start location. It makes sense in this case to highlight the full range that would be automatically removed by the fixer.

I'm willing to champion the enhancement, though I'm not sure should this be rather accepted as a bug.

@mdjermanovic mdjermanovic added evaluating and removed triage labels Sep 26, 2019
@mdjermanovic mdjermanovic self-assigned this Sep 26, 2019
mdjermanovic added a commit that referenced this issue Oct 22, 2019
@btmills btmills closed this in 4d84210 Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.