Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Updated linter line length to something less draconian. #275

Merged
merged 2 commits into from
Sep 15, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
],
"max-line-length": [
true,
100
200

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

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 :)

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.

],
"no-require-imports": false,
"no-trailing-whitespace": true,
Expand Down