Skip to content

Commit

Permalink
feat(max-len): broaden ignore list (#130)
Browse files Browse the repository at this point in the history
Adds strings, template literals, regexp literals, and urls to the
max-len ignore list. All of these things can and sometimes must exceed
this length.

Strings and template-literals are intended for output.
Wrapping/truncation is the job of the terminal.
regexp formulas are not something that can be arbitrarily broken up and
truncated.
urls are strings that should not be broken up.
  • Loading branch information
wraithgar authored Jan 14, 2025
1 parent 2220bb5 commit 2280969
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ module.exports = {
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'keyword-spacing': ['error', { before: true, after: true }],
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'max-len': ['error', 100, { ignoreComments: true }],
'max-len': ['error', 100, {
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
ignoreUrls: true,
}],
'new-cap': ['error', { newIsCap: true, capIsNew: false, properties: true }],
'new-parens': 'error',
'no-array-constructor': 'error',
Expand Down

0 comments on commit 2280969

Please sign in to comment.