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

@@ -79,7 +79,7 @@ const MAX_AUTOCOMPLETIONS = (exports.MAX_AUTOCOMPLETIONS = 1500);
* access (e.g. `window["addEvent`).
* }
*/
/* eslint-disable complexity */
// eslint-disable-next-line complexity
function JSPropertyProvider({
dbgObject,
environment,
@@ -348,7 +348,6 @@ function JSPropertyProvider({
return prepareReturnedObject(getMatchedPropsInDbgObject(obj, search));
}
/* eslint-enable complexity */
function hasArrayIndex(str) {
return /\[\d+\]$/.test(str);
@@ -396,7 +395,7 @@ const OPERATOR_CHARS_SET = new Set(";,:=<>+-*%|&^~?!".split(""));
* element access (e.g. `x["match`).
* }
*/
/* eslint-disable complexity */
// eslint-disable-next-line complexity
function analyzeInputString(str) {
// work variables.
const bodyStack = [];
@@ -598,7 +597,6 @@ function analyzeInputString(str) {
isElementAccess,
};
}
/* eslint-enable complexity */
/**
* For a given environment and constructor name, returns its Debugger.Object wrapped