From 0f08ac9a9cfeb7cbaeb9b3c81173a1385715b6a1 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 20 Mar 2018 17:04:48 -0700 Subject: [PATCH] Tooling: Remove some redundant max-len patterns - `///` is not used in any linted files. It is/was used in webpack dist, but those are not and should not be passed through ESLint. - `QUnit` was presumably added prematurely on the assumption that overly long test names should not be broken over multiple lines. However, being strings, they are already ignored. - `// (?!eslint..)` was redundant. Ignoring warnings from max-len about an eslint-disable line has no influence on the actual parsing of those lines by ESLint. Follows-up 807100b. Bug: T185295 Change-Id: I2be2492848190b53d45240b38a08784b4a370819 --- .eslintrc.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b5e2c49d8..d33a7d0c3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -24,12 +24,10 @@ "warn", { "tabWidth": 2, - // Note: exclude all eslint- directives except for max-len itself - // since `// eslint-disable-line max-len` would cause this line to be - // ignored AND this rule to be disabled which would trigger - // --report-unused-disable-directives. By excluding max-len, the effect - // is to consider the line but disable this rule. - "ignorePattern": "^/// .+|// (?!eslint-.+max-len)eslint-.+|QUnit.", + // Exclude by default: + // - `eslint-` directives. To avoid having to disable + // eslint for a long eslint-disable line. + "ignorePattern": "^// eslint-.+", "ignoreUrls": true, "ignoreComments": false, "ignoreRegExpLiterals": true,