diff options
author | Rich Trott <rtrott@gmail.com> | 2017-05-03 08:01:57 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-05-05 14:43:25 +0300 |
commit | feb90d37ff542c58612c800bb89a4574bcfb25a9 (patch) | |
tree | 0deb48cd2ae69653d411eee97b5a79e4acab2d32 /.eslintrc.yaml | |
parent | f1d593cda16dec18d56e76bedb11200d57e74e36 (diff) |
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: https://github.com/nodejs/node/pull/12807
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to '.eslintrc.yaml')
-rw-r--r-- | .eslintrc.yaml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 8cf566a03f9..b2201aa41ff 100644 --- a/.eslintrc.yaml +++ b/.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}] |