-
Notifications
You must be signed in to change notification settings - Fork 889
[max-line-length] ignore strings and regex in max line length #4798
[max-line-length] ignore strings and regex in max line length #4798
Conversation
…or template strings.
…ng checks enabled.
…ts with older versions.
Failing in |
…used consistently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, thanks for sending this in! A few requested changes around readability.
… combined the two consecutive filter calls into one.
@JoshuaKGoldberg Thanks for reviewing so fast. I made all requested changes. |
No, this looks fine. TSLint's being deprecated soon (#4534) and has been recommending using Prettier instead of formatting rules for quite some time. I don't think that extra logic will be worth the added complexity.
Looks good! 😄 I played around with this locally a bit and it worked great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks for sending this in @vmk1vmk! 🙌
In tslint 5.19.0 they added a separate option that determines whether strings should be checked and it seems to have been defaulted to `false` (palantir/tslint#4798). As a result we ended up with a few places where the limit was being violated. These changes explicitly enable checking of strings and fix the failures that we had accumulated.
In tslint 5.19.0 they added a separate option that determines whether strings should be checked and it seems to have been defaulted to `false` (palantir/tslint#4798). As a result we ended up with a few places where the limit was being violated. These changes explicitly enable checking of strings and fix the failures that we had accumulated.
PR checklist
Overview of change:
Added functionality to ignore strings exceeding the max line length, it is by default enabled.
Added option
check-strings
to control if exceeding strings are skipped or treated as errors.Added the same option for regex called
check-regex
.Is there anything you'd like reviewers to focus on?
check-plain-strings
andcheck-template-strings
?CHANGELOG.md entry:
[enhancement] Added
check-strings
andcheck-regex
options tomax-line-lenght
rule.