From 228096947957416d52918223ea7af4e9c8f22380 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 14 Jan 2025 08:46:10 -0800 Subject: [PATCH] feat(max-len): broaden ignore list (#130) 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. --- lib/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 0172a65..e5c7d5f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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',