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

Assignees
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules

Comments

@golopot
Copy link
Contributor

golopot commented Sep 26, 2019

What rule do you want to change?
no-trailing-spaces

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

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
a     

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?
No

@golopot golopot added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules triage An ESLint team member will look at this issue soon labels Sep 26, 2019
@mdjermanovic
Copy link
Member

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 The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Sep 26, 2019
@mdjermanovic mdjermanovic self-assigned this Sep 26, 2019
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 24, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.