[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.
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
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. |
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
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-stringsto 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-stringsandcheck-template-strings?CHANGELOG.md entry:
[enhancement] Added
check-stringsandcheck-regexoptions tomax-line-lenghtrule.