-
Notifications
You must be signed in to change notification settings - Fork 28
Updated linter line length to something less draconian. #275
Conversation
tslint.json
Outdated
@@ -82,7 +82,7 @@ | |||
], | |||
"max-line-length": [ | |||
true, | |||
100 | |||
200 |
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.
I'm going to disagree here, but will defer to @Blackbaud-BobbyEarl. The line length might seem too short on a widescreen monitor, but shorter lines are easier to read and enforce fewer tab structures.
Obviously this is opinion based, but I think the consensus is 80-100 characters.
Interesting read: https://stackoverflow.com/questions/110928/is-there-a-valid-reason-for-enforcing-a-maximum-width-of-80-characters-in-a-code
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.
I understand the rationale, but for me personally, it is really obnoxious with strings. I don't think I should have to modify my string literals to be concatinated or array.joined to pass a linter rule. There has to be some kind of happy medium between the two.
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.
I could also pepper my code with //Ignore rule
, but that seems just as bad.
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.
const str = [
'a',
'long',
'string'
].join('');
^ To me, that's a thing of beauty :)
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.
I'm a huge proponent of longer lines than we allow today. I generally fit 120-140 characters per line without scrolling on my laptop.
Codecov Report
@@ Coverage Diff @@
## master #275 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 57 57
Lines 1344 1344
Branches 200 200
=====================================
Hits 1344 1344
Continue to review full report at Codecov.
|
i endorse this pr 🇺🇸 |
No description provided.