Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes

We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

Differential Revision: https://phabricator.services.mozilla.com/D32139
This commit is contained in:
Patrick Brosset
2019-05-23 09:06:16 +00:00
parent 38a06a0389
commit d93842478f
48 changed files with 130 additions and 2 deletions

View File

@@ -539,6 +539,7 @@ function parseNamedDeclarations(isCssPropertyKnown, inputString,
* @return {Array} an array of objects with the following signature:
* [{ "value": string, "type": integer }, ...]
*/
/* eslint-disable complexity */
function parsePseudoClassesAndAttributes(value) {
if (!value) {
throw new Error("empty input string");
@@ -624,6 +625,7 @@ function parsePseudoClassesAndAttributes(value) {
return result;
}
/* eslint-enable complexity */
/**
* Expects a single CSS value to be passed as the input and parses the value