Skip to content

Commit feb90d3

Browse files
Trottaddaleax
authored andcommitted
tools: relax lint rule for regexps
Relax the rule for maximum line length in JS files if the line contains a regular expression literal. This will avoid the need to convert a regular expression literal into a RegExp constructor call broken across multiple lines in order to satisfy the maximum line length rule. That practice hampers readability. PR-URL: #12807 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent f1d593c commit feb90d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.eslintrc.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ rules:
106106
key-spacing: [2, {mode: minimum}]
107107
keyword-spacing: 2
108108
linebreak-style: [2, unix]
109-
max-len: [2, {code: 80, ignoreUrls: true, tabWidth: 2}]
109+
max-len: [2, {code: 80,
110+
ignoreRegExpLiterals: true,
111+
ignoreUrls: true,
112+
tabWidth: 2}]
110113
new-parens: 2
111114
no-mixed-spaces-and-tabs: 2
112115
no-multiple-empty-lines: [2, {max: 2, maxEOF: 0, maxBOF: 0}]

0 commit comments

Comments
 (0)