Skip to content
Browse files

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 <>
Reviewed-By: Vse Mozhet Byt <>
Reviewed-By: Refael Ackermann <>
Reviewed-By: Yuta Hiroto <>
Reviewed-By: Сковорода Никита Андреевич <>
Reviewed-By: James M Snell <>
Reviewed-By: Anna Henningsen <>
  • Loading branch information...
Trott authored and addaleax committed May 3, 2017
1 parent f1d593c commit feb90d37ff542c58612c800bb89a4574bcfb25a9
Showing with 4 additions and 1 deletion.
  1. +4 −1 .eslintrc.yaml
@@ -106,7 +106,10 @@ rules:
key-spacing: [2, {mode: minimum}]
keyword-spacing: 2
linebreak-style: [2, unix]
max-len: [2, {code: 80, ignoreUrls: true, tabWidth: 2}]
max-len: [2, {code: 80,
ignoreRegExpLiterals: true,
ignoreUrls: true,
tabWidth: 2}]
new-parens: 2
no-mixed-spaces-and-tabs: 2
no-multiple-empty-lines: [2, {max: 2, maxEOF: 0, maxBOF: 0}]

0 comments on commit feb90d3

Please sign in to comment.
You can’t perform that action at this time.