Skip to content

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

@chiawendt

Description

@chiawendt

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

Metadata

Metadata

Assignees

Labels

archived due to ageThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionruleRelates to ESLint's core rules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions