Bug 1593921 - Use eslint-disable-next-line to disable complexity checks in DevTools r=pbro

Using next-line is less error prone for refactorings than wrapping methods with enable/disable blocks.

Differential Revision: https://phabricator.services.mozilla.com/D51782
This commit is contained in:
Julian Descottes
2019-11-05 14:29:04 +00:00
parent cd92f0ff8a
commit 03cdcd7b0a
44 changed files with 63 additions and 125 deletions

View File

@@ -284,7 +284,7 @@ function cssTrim(str) {
* rewriteDeclarations, and skip the usual name-checking
* heuristic.
*/
/* eslint-disable complexity */
// eslint-disable-next-line complexity
function parseDeclarationsInternal(
isCssPropertyKnown,
inputString,
@@ -505,7 +505,6 @@ function parseDeclarationsInternal(
return declarations;
}
/* eslint-enable complexity */
/**
* Returns an array of CSS declarations given a string.
@@ -592,7 +591,7 @@ function parseNamedDeclarations(
* @return {Array} an array of objects with the following signature:
* [{ "value": string, "type": integer }, ...]
*/
/* eslint-disable complexity */
// eslint-disable-next-line complexity
function parsePseudoClassesAndAttributes(value) {
if (!value) {
throw new Error("empty input string");
@@ -678,7 +677,6 @@ function parsePseudoClassesAndAttributes(value) {
return result;
}
/* eslint-enable complexity */
/**
* Expects a single CSS value to be passed as the input and parses the value