-
Notifications
You must be signed in to change notification settings - Fork 889
no-trailing-whitespace ignores trailing whitespace in comments #2049
Comments
Is there ever a valid reason for that? I'd prefer not to add an option if not, and just fix it |
Why would you want to notify trailing whitespace in comments? Isn't the whole point of comments to not run any validations on it other than it being opened/closed properly?
for that. Sidenote, seems this does force you to use multi-line comments this will be reported as an error:
Though it shows up sometimes but not in others. Will investigate some more |
I guess this is open to interpretation, but no, I don't think that's the whole point of comments. I don't see why you would want trailing whitespace in some part of your code and not others. If you and others feel strongly about it, you could send a PR to allow the rule to ignore comments. |
^ this. I like having trailing whitespace in my TSDoc comments, but otherwise it's a waste. /**
*.{description}
*.
*.{params,etc}
*/ Config for the rule might want to include whether all comments are ignored or just TSDoc comments. |
Bug Report
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
no error
Expected behavior
Is this intended or can this be fixed? And should this be configurable with a config option?
The fix would not be difficult. I'd like to fix this if you want it
The text was updated successfully, but these errors were encountered: