mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-23 10:21:11 +00:00
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
This commit is contained in:
parent
422a02d61a
commit
0f08ac9a9c
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue