Backed out changeset 0f9626b48a66 (bug 1553451) for linting failures. CLOSED TREE
This commit is contained in:
@@ -213,11 +213,7 @@ module.exports = {
|
|||||||
// Require camel case names
|
// Require camel case names
|
||||||
"camelcase": "error",
|
"camelcase": "error",
|
||||||
// Warn about cyclomatic complexity in functions.
|
// Warn about cyclomatic complexity in functions.
|
||||||
// 20 is ESLint's default, and we want to keep it this way to prevent new highly
|
"complexity": ["error", 40],
|
||||||
// complex functions from being introduced. However, because Mozilla's eslintrc has
|
|
||||||
// some other value defined, we need to override it here. See bug 1553449 for more
|
|
||||||
// information on complex DevTools functions that are currently excluded.
|
|
||||||
"complexity": ["error", 20],
|
|
||||||
// Don't warn for inconsistent naming when capturing this (not so important
|
// Don't warn for inconsistent naming when capturing this (not so important
|
||||||
// with auto-binding fat arrow functions).
|
// with auto-binding fat arrow functions).
|
||||||
"consistent-this": "off",
|
"consistent-this": "off",
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ class SummaryGraph extends PureComponent {
|
|||||||
this.props.selectAnimation(this.props.animation);
|
this.props.selectAnimation(this.props.animation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
getTitleText(state) {
|
getTitleText(state) {
|
||||||
const getTime =
|
const getTime =
|
||||||
time => getFormatStr("player.timeLabel", numberWithDecimals(time / 1000, 2));
|
time => getFormatStr("player.timeLabel", numberWithDecimals(time / 1000, 2));
|
||||||
@@ -137,7 +136,6 @@ class SummaryGraph extends PureComponent {
|
|||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -199,7 +199,6 @@ const reducers = {
|
|||||||
* - when changes cancel each other out leaving the rule unchanged, the rule is removed
|
* - when changes cancel each other out leaving the rule unchanged, the rule is removed
|
||||||
* from the store. Its parent rule is removed as well if it too ends up unchanged.
|
* from the store. Its parent rule is removed as well if it too ends up unchanged.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
[TRACK_CHANGE](state, { change }) {
|
[TRACK_CHANGE](state, { change }) {
|
||||||
const defaults = {
|
const defaults = {
|
||||||
selector: null,
|
selector: null,
|
||||||
@@ -352,7 +351,6 @@ const reducers = {
|
|||||||
|
|
||||||
return state;
|
return state;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
[RESET_CHANGES](state) {
|
[RESET_CHANGES](state) {
|
||||||
return INITIAL_STATE;
|
return INITIAL_STATE;
|
||||||
|
|||||||
@@ -325,7 +325,6 @@ CssComputedView.prototype = {
|
|||||||
* - value {Object} Depends on the type of the node
|
* - value {Object} Depends on the type of the node
|
||||||
* returns null if the node isn't anything we care about
|
* returns null if the node isn't anything we care about
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
getNodeInfo: function(node) {
|
getNodeInfo: function(node) {
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return null;
|
return null;
|
||||||
@@ -429,7 +428,6 @@ CssComputedView.prototype = {
|
|||||||
value,
|
value,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
_createPropertyViews: function() {
|
_createPropertyViews: function() {
|
||||||
if (this._createViewsPromise) {
|
if (this._createViewsPromise) {
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ class FlexItemSizingProperties extends PureComponent {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
renderFlexibilitySection(flexItemSizing, mainFinalSize, properties, computedStyle) {
|
renderFlexibilitySection(flexItemSizing, mainFinalSize, properties, computedStyle) {
|
||||||
const {
|
const {
|
||||||
mainDeltaSize,
|
mainDeltaSize,
|
||||||
@@ -184,7 +183,6 @@ class FlexItemSizingProperties extends PureComponent {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
renderMinimumSizeSection(flexItemSizing, properties, dimension) {
|
renderMinimumSizeSection(flexItemSizing, properties, dimension) {
|
||||||
const { clampState, mainMinSize, mainDeltaSize } = flexItemSizing;
|
const { clampState, mainMinSize, mainDeltaSize } = flexItemSizing;
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ SelectorAutocompleter.prototype = {
|
|||||||
* '#f' requires an Id suggestion, so the state is States.ID
|
* '#f' requires an Id suggestion, so the state is States.ID
|
||||||
* 'div > .foo' requires class suggestion, so state is States.CLASS
|
* 'div > .foo' requires class suggestion, so state is States.CLASS
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
get state() {
|
get state() {
|
||||||
if (!this.searchBox || !this.searchBox.value) {
|
if (!this.searchBox || !this.searchBox.value) {
|
||||||
return null;
|
return null;
|
||||||
@@ -307,7 +306,6 @@ SelectorAutocompleter.prototype = {
|
|||||||
}
|
}
|
||||||
return this._state;
|
return this._state;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes event listeners and cleans up references.
|
* Removes event listeners and cleans up references.
|
||||||
|
|||||||
@@ -895,7 +895,6 @@ MarkupView.prototype = {
|
|||||||
/**
|
/**
|
||||||
* Key shortcut listener.
|
* Key shortcut listener.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_onShortcut(name, event) {
|
_onShortcut(name, event) {
|
||||||
if (this._isInputOrTextarea(event.target)) {
|
if (this._isInputOrTextarea(event.target)) {
|
||||||
return;
|
return;
|
||||||
@@ -1025,7 +1024,6 @@ MarkupView.prototype = {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a node is an input or textarea
|
* Check if a node is an input or textarea
|
||||||
|
|||||||
@@ -274,7 +274,6 @@ class ElementStyle {
|
|||||||
* Which pseudo element to flag as overridden.
|
* Which pseudo element to flag as overridden.
|
||||||
* Empty string or undefined will default to no pseudo element.
|
* Empty string or undefined will default to no pseudo element.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
updateDeclarations(pseudo = "") {
|
updateDeclarations(pseudo = "") {
|
||||||
// Gather all the text properties applied by these rules, ordered
|
// Gather all the text properties applied by these rules, ordered
|
||||||
// from more- to less-specific. Text properties from keyframes rule are
|
// from more- to less-specific. Text properties from keyframes rule are
|
||||||
@@ -377,7 +376,6 @@ class ElementStyle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a new declaration to the rule.
|
* Adds a new declaration to the rule.
|
||||||
|
|||||||
@@ -371,7 +371,6 @@ CssRuleView.prototype = {
|
|||||||
* - value {Object} Depends on the type of the node
|
* - value {Object} Depends on the type of the node
|
||||||
* returns null of the node isn't anything we care about
|
* returns null of the node isn't anything we care about
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
getNodeInfo: function(node) {
|
getNodeInfo: function(node) {
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return null;
|
return null;
|
||||||
@@ -487,7 +486,6 @@ CssRuleView.prototype = {
|
|||||||
value,
|
value,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the RuleEditor instance.
|
* Retrieve the RuleEditor instance.
|
||||||
@@ -1144,7 +1142,6 @@ CssRuleView.prototype = {
|
|||||||
/**
|
/**
|
||||||
* Creates editor UI for each of the rules in _elementStyle.
|
* Creates editor UI for each of the rules in _elementStyle.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_createEditors: function() {
|
_createEditors: function() {
|
||||||
// Run through the current list of rules, attaching
|
// Run through the current list of rules, attaching
|
||||||
// their editors in order. Create editors if needed.
|
// their editors in order. Create editors if needed.
|
||||||
@@ -1225,7 +1222,6 @@ CssRuleView.prototype = {
|
|||||||
|
|
||||||
return promise.all(editorReadyPromises);
|
return promise.all(editorReadyPromises);
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Highlight rules that matches the filter search value and returns a
|
* Highlight rules that matches the filter search value and returns a
|
||||||
|
|||||||
@@ -389,7 +389,6 @@ TextPropertyEditor.prototype = {
|
|||||||
/**
|
/**
|
||||||
* Populate the span based on changes to the TextProperty.
|
* Populate the span based on changes to the TextProperty.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
update: function() {
|
update: function() {
|
||||||
if (this.ruleView.isDestroyed) {
|
if (this.ruleView.isDestroyed) {
|
||||||
return;
|
return;
|
||||||
@@ -611,7 +610,6 @@ TextPropertyEditor.prototype = {
|
|||||||
// Update the rule property highlight.
|
// Update the rule property highlight.
|
||||||
this.ruleView._updatePropertyHighlight(this);
|
this.ruleView._updatePropertyHighlight(this);
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
_onStartEditing: function() {
|
_onStartEditing: function() {
|
||||||
this.element.classList.remove("ruleview-overridden");
|
this.element.classList.remove("ruleview-overridden");
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ exports.getCustomTreeMapDisplays = function() {
|
|||||||
* @param {snapshotState | diffingState} state
|
* @param {snapshotState | diffingState} state
|
||||||
* @return {String}
|
* @return {String}
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
exports.getStatusText = function(state) {
|
exports.getStatusText = function(state) {
|
||||||
assert(state, "Must have a state");
|
assert(state, "Must have a state");
|
||||||
|
|
||||||
@@ -171,7 +170,6 @@ exports.getStatusText = function(state) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string representing a readable form of the snapshot's state;
|
* Returns a string representing a readable form of the snapshot's state;
|
||||||
@@ -180,7 +178,6 @@ exports.getStatusText = function(state) {
|
|||||||
* @param {snapshotState | diffingState} state
|
* @param {snapshotState | diffingState} state
|
||||||
* @return {String}
|
* @return {String}
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
exports.getStatusTextFull = function(state) {
|
exports.getStatusTextFull = function(state) {
|
||||||
assert(!!state, "Must have a state");
|
assert(!!state, "Must have a state");
|
||||||
|
|
||||||
@@ -248,7 +245,6 @@ exports.getStatusTextFull = function(state) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the snapshot is in a diffable state, false otherwise.
|
* Return true if the snapshot is in a diffable state, false otherwise.
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ class RequestListItem extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
blocked,
|
blocked,
|
||||||
@@ -285,7 +284,6 @@ class RequestListItem extends Component {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = RequestListItem;
|
module.exports = RequestListItem;
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ class SecurityPanel extends Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
render() {
|
render() {
|
||||||
const { openLink, request } = this.props;
|
const { openLink, request } = this.props;
|
||||||
const { securityInfo, url } = request;
|
const { securityInfo, url } = request;
|
||||||
@@ -233,7 +232,6 @@ class SecurityPanel extends Component {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = SecurityPanel;
|
module.exports = SecurityPanel;
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ function Requests() {
|
|||||||
* This reducer is responsible for maintaining list of request
|
* This reducer is responsible for maintaining list of request
|
||||||
* within the Network panel.
|
* within the Network panel.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function requestsReducer(state = Requests(), action) {
|
function requestsReducer(state = Requests(), action) {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
// Appending new request into the list/map.
|
// Appending new request into the list/map.
|
||||||
@@ -183,7 +182,6 @@ function requestsReducer(state = Requests(), action) {
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ function processFlagFilter(type, value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
function isFlagFilterMatch(item, { type, value, negative }) {
|
function isFlagFilterMatch(item, { type, value, negative }) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return false;
|
return false;
|
||||||
@@ -234,7 +233,6 @@ function isFlagFilterMatch(item, { type, value, negative }) {
|
|||||||
}
|
}
|
||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
function isSizeMatch(value, size) {
|
function isSizeMatch(value, size) {
|
||||||
return value >= (size - size / 10) && value <= (size + size / 10);
|
return value >= (size - size / 10) && value <= (size + size / 10);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ class RequestListContextMenu {
|
|||||||
this.props = props;
|
this.props = props;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
open(event, clickedRequest, requests) {
|
open(event, clickedRequest, requests) {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
@@ -285,7 +284,6 @@ class RequestListContextMenu {
|
|||||||
screenY: event.screenY,
|
screenY: event.screenY,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens selected item in the debugger
|
* Opens selected item in the debugger
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ const gFrameData = new WeakMap();
|
|||||||
* Parses the raw location of this function call to retrieve the actual
|
* Parses the raw location of this function call to retrieve the actual
|
||||||
* function name, source url, host name, line and column.
|
* function name, source url, host name, line and column.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function parseLocation(location, fallbackLine, fallbackColumn) {
|
function parseLocation(location, fallbackLine, fallbackColumn) {
|
||||||
// Parse the `location` for the function name, source url, line, column etc.
|
// Parse the `location` for the function name, source url, line, column etc.
|
||||||
|
|
||||||
@@ -183,7 +182,6 @@ function parseLocation(location, fallbackLine, fallbackColumn) {
|
|||||||
|
|
||||||
return { functionName, fileName, host, port, url, line, column };
|
return { functionName, fileName, host, port, url, line, column };
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the properties of `isContent` and `category` on a frame.
|
* Sets the properties of `isContent` and `category` on a frame.
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ class Frame extends Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
render() {
|
render() {
|
||||||
let frame, isSourceMapped;
|
let frame, isSourceMapped;
|
||||||
const {
|
const {
|
||||||
@@ -251,7 +250,6 @@ class Frame extends Component {
|
|||||||
|
|
||||||
return dom.span(attributes, ...elements);
|
return dom.span(attributes, ...elements);
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Frame;
|
module.exports = Frame;
|
||||||
|
|||||||
@@ -553,7 +553,6 @@ class Tree extends Component {
|
|||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {Event} e
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_onKeyDown(e) {
|
_onKeyDown(e) {
|
||||||
if (this.props.focused == null) {
|
if (this.props.focused == null) {
|
||||||
return;
|
return;
|
||||||
@@ -625,7 +624,6 @@ class Tree extends Component {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
get activeElement() {
|
get activeElement() {
|
||||||
return this.refs.tree.ownerDocument.activeElement;
|
return this.refs.tree.ownerDocument.activeElement;
|
||||||
|
|||||||
@@ -199,7 +199,6 @@ class SplitBox extends Component {
|
|||||||
|
|
||||||
// Rendering
|
// Rendering
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
render() {
|
render() {
|
||||||
const { endPanelControl, splitterSize, vert } = this.state;
|
const { endPanelControl, splitterSize, vert } = this.state;
|
||||||
const { startPanel, endPanel, minSize, maxSize } = this.props;
|
const { startPanel, endPanel, minSize, maxSize } = this.props;
|
||||||
@@ -291,7 +290,6 @@ class SplitBox extends Component {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = SplitBox;
|
module.exports = SplitBox;
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ define(function(require, exports, module) {
|
|||||||
|
|
||||||
// Event Handlers
|
// Event Handlers
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
onKeyDown(event) {
|
onKeyDown(event) {
|
||||||
if (!SUPPORTED_KEYS.includes(event.key)) {
|
if (!SUPPORTED_KEYS.includes(event.key)) {
|
||||||
return;
|
return;
|
||||||
@@ -353,7 +352,6 @@ define(function(require, exports, module) {
|
|||||||
this.treeRef.current.focus();
|
this.treeRef.current.focus();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
onClickRow(nodePath, event) {
|
onClickRow(nodePath, event) {
|
||||||
const onClickRow = this.props.onClickRow;
|
const onClickRow = this.props.onClickRow;
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ function naturalSortCaseInsensitive(a, b) {
|
|||||||
* @param {Boolean} insensitive
|
* @param {Boolean} insensitive
|
||||||
* Should the search be case insensitive?
|
* Should the search be case insensitive?
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function naturalSort(a, b, insensitive) {
|
function naturalSort(a, b, insensitive) {
|
||||||
// convert all to strings strip whitespace
|
// convert all to strings strip whitespace
|
||||||
const i = function(s) {
|
const i = function(s) {
|
||||||
@@ -105,4 +104,3 @@ function naturalSort(a, b, insensitive) {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|||||||
@@ -654,7 +654,6 @@ OutputParser.prototype = {
|
|||||||
* The node to which spans containing points are added.
|
* The node to which spans containing points are added.
|
||||||
* @returns {Node} The container to which spans have been added.
|
* @returns {Node} The container to which spans have been added.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_addPolygonPointNodes: function(coords, container) {
|
_addPolygonPointNodes: function(coords, container) {
|
||||||
const tokenStream = getCSSLexer(coords);
|
const tokenStream = getCSSLexer(coords);
|
||||||
let token = tokenStream.nextToken();
|
let token = tokenStream.nextToken();
|
||||||
@@ -759,7 +758,6 @@ OutputParser.prototype = {
|
|||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the given circle coordinates and populate the given container appropriately
|
* Parse the given circle coordinates and populate the given container appropriately
|
||||||
@@ -771,7 +769,6 @@ OutputParser.prototype = {
|
|||||||
* The node to which the definition is added.
|
* The node to which the definition is added.
|
||||||
* @returns {Node} The container to which the definition has been added.
|
* @returns {Node} The container to which the definition has been added.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_addCirclePointNodes: function(coords, container) {
|
_addCirclePointNodes: function(coords, container) {
|
||||||
const tokenStream = getCSSLexer(coords);
|
const tokenStream = getCSSLexer(coords);
|
||||||
let token = tokenStream.nextToken();
|
let token = tokenStream.nextToken();
|
||||||
@@ -877,7 +874,6 @@ OutputParser.prototype = {
|
|||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the given ellipse coordinates and populate the given container appropriately
|
* Parse the given ellipse coordinates and populate the given container appropriately
|
||||||
@@ -889,7 +885,6 @@ OutputParser.prototype = {
|
|||||||
* The node to which the definition is added.
|
* The node to which the definition is added.
|
||||||
* @returns {Node} The container to which the definition has been added.
|
* @returns {Node} The container to which the definition has been added.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_addEllipsePointNodes: function(coords, container) {
|
_addEllipsePointNodes: function(coords, container) {
|
||||||
const tokenStream = getCSSLexer(coords);
|
const tokenStream = getCSSLexer(coords);
|
||||||
let token = tokenStream.nextToken();
|
let token = tokenStream.nextToken();
|
||||||
@@ -1005,7 +1000,6 @@ OutputParser.prototype = {
|
|||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the given inset coordinates and populate the given container appropriately.
|
* Parse the given inset coordinates and populate the given container appropriately.
|
||||||
@@ -1016,7 +1010,6 @@ OutputParser.prototype = {
|
|||||||
* The node to which the definition is added.
|
* The node to which the definition is added.
|
||||||
* @returns {Node} The container to which the definition has been added.
|
* @returns {Node} The container to which the definition has been added.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_addInsetPointNodes: function(coords, container) {
|
_addInsetPointNodes: function(coords, container) {
|
||||||
const insetPoints = ["top", "right", "bottom", "left"];
|
const insetPoints = ["top", "right", "bottom", "left"];
|
||||||
const tokenStream = getCSSLexer(coords);
|
const tokenStream = getCSSLexer(coords);
|
||||||
@@ -1130,7 +1123,6 @@ OutputParser.prototype = {
|
|||||||
|
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a angle value to the output
|
* Append a angle value to the output
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ function isContentScheme(location, i = 0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
function isChromeScheme(location, i = 0) {
|
function isChromeScheme(location, i = 0) {
|
||||||
const firstChar = location.charCodeAt(i);
|
const firstChar = location.charCodeAt(i);
|
||||||
|
|
||||||
@@ -316,7 +315,6 @@ function isChromeScheme(location, i = 0) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
function isWASM(location, i = 0) {
|
function isWASM(location, i = 0) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -671,7 +671,6 @@ class Telemetry {
|
|||||||
* The ID of the tool that has been opened.
|
* The ID of the tool that has been opened.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function getChartsFromToolId(id) {
|
function getChartsFromToolId(id) {
|
||||||
if (!id) {
|
if (!id) {
|
||||||
return null;
|
return null;
|
||||||
@@ -751,7 +750,6 @@ function getChartsFromToolId(id) {
|
|||||||
countScalar: countScalar,
|
countScalar: countScalar,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the first caller and calling line outside of this file in the
|
* Displays the first caller and calling line outside of this file in the
|
||||||
|
|||||||
@@ -799,7 +799,6 @@ VariablesView.prototype = {
|
|||||||
/**
|
/**
|
||||||
* Listener handling a key down event on the view.
|
* Listener handling a key down event on the view.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_onViewKeyDown: function(e) {
|
_onViewKeyDown: function(e) {
|
||||||
const item = this.getFocusedItem();
|
const item = this.getFocusedItem();
|
||||||
|
|
||||||
@@ -890,7 +889,6 @@ VariablesView.prototype = {
|
|||||||
item._onAddProperty(e);
|
item._onAddProperty(e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the text displayed in this container when there are no available items.
|
* Sets the text displayed in this container when there are no available items.
|
||||||
@@ -2795,7 +2793,6 @@ Variable.prototype = extend(Scope.prototype, {
|
|||||||
* and specifies if it's a 'this', '<exception>', '<return>' or '__proto__'
|
* and specifies if it's a 'this', '<exception>', '<return>' or '__proto__'
|
||||||
* reference.
|
* reference.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_setAttributes: function() {
|
_setAttributes: function() {
|
||||||
const ownerView = this.ownerView;
|
const ownerView = this.ownerView;
|
||||||
if (ownerView.preventDescriptorModifiers) {
|
if (ownerView.preventDescriptorModifiers) {
|
||||||
@@ -2853,7 +2850,6 @@ Variable.prototype = extend(Scope.prototype, {
|
|||||||
target.setAttribute("pseudo-item", "");
|
target.setAttribute("pseudo-item", "");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the necessary event listeners for this variable.
|
* Adds the necessary event listeners for this variable.
|
||||||
|
|||||||
@@ -506,7 +506,6 @@ class JSTerm extends Component {
|
|||||||
* @param {Object} response
|
* @param {Object} response
|
||||||
* The message received from the server.
|
* The message received from the server.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
async _executeResultCallback(response) {
|
async _executeResultCallback(response) {
|
||||||
if (!this.webConsoleUI) {
|
if (!this.webConsoleUI) {
|
||||||
return null;
|
return null;
|
||||||
@@ -579,7 +578,6 @@ class JSTerm extends Component {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
screenshotNotify(results) {
|
screenshotNotify(results) {
|
||||||
const wrappedResults = results.map(message => ({ message, type: "logMessage" }));
|
const wrappedResults = results.map(message => ({ message, type: "logMessage" }));
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ class Message extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
open,
|
open,
|
||||||
@@ -347,7 +346,6 @@ class Message extends Component {
|
|||||||
attachment ? null : dom.br(),
|
attachment ? null : dom.br(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Message;
|
module.exports = Message;
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ class ReverseSearchInput extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
onInputKeyDown(event) {
|
onInputKeyDown(event) {
|
||||||
const {
|
const {
|
||||||
keyCode,
|
keyCode,
|
||||||
@@ -128,7 +127,6 @@ class ReverseSearchInput extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
renderSearchInformation() {
|
renderSearchInformation() {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ function cloneState(state) {
|
|||||||
* @param {UiState} uiState: The ui state.
|
* @param {UiState} uiState: The ui state.
|
||||||
* @returns {MessageState} a new messages state.
|
* @returns {MessageState} a new messages state.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function addMessage(newMessage, state, filtersState, prefsState, uiState) {
|
function addMessage(newMessage, state, filtersState, prefsState, uiState) {
|
||||||
const {
|
const {
|
||||||
messagesById,
|
messagesById,
|
||||||
@@ -275,9 +274,7 @@ function addMessage(newMessage, state, filtersState, prefsState, uiState) {
|
|||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
function messages(state = MessageState(), action, filtersState, prefsState, uiState) {
|
function messages(state = MessageState(), action, filtersState, prefsState, uiState) {
|
||||||
const {
|
const {
|
||||||
messagesById,
|
messagesById,
|
||||||
@@ -544,7 +541,6 @@ function messages(state = MessageState(), action, filtersState, prefsState, uiSt
|
|||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the new current group id given the previous current group and the groupsById
|
* Returns the new current group id given the previous current group and the groupsById
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ global.ChromeUtils = {
|
|||||||
|
|
||||||
// Point to vendored-in files and mocks when needed.
|
// Point to vendored-in files and mocks when needed.
|
||||||
const requireHacker = require("require-hacker");
|
const requireHacker = require("require-hacker");
|
||||||
/* eslint-disable complexity */
|
|
||||||
requireHacker.global_hook("default", (path, module) => {
|
requireHacker.global_hook("default", (path, module) => {
|
||||||
switch (path) {
|
switch (path) {
|
||||||
// For Enzyme
|
// For Enzyme
|
||||||
@@ -139,7 +138,6 @@ requireHacker.global_hook("default", (path, module) => {
|
|||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
});
|
});
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
// Configure enzyme with React 16 adapter. This needs to be done after we set the
|
// Configure enzyme with React 16 adapter. This needs to be done after we set the
|
||||||
// requireHack hook so `require()` calls in Enzyme are handled as well.
|
// requireHack hook so `require()` calls in Enzyme are handled as well.
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ function transformPacket(packet) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
function transformConsoleAPICallPacket(packet) {
|
function transformConsoleAPICallPacket(packet) {
|
||||||
const { message } = packet;
|
const { message } = packet;
|
||||||
|
|
||||||
@@ -199,7 +198,6 @@ function transformConsoleAPICallPacket(packet) {
|
|||||||
chromeContext: message.chromeContext,
|
chromeContext: message.chromeContext,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
function transformNavigationMessagePacket(packet) {
|
function transformNavigationMessagePacket(packet) {
|
||||||
const { url } = packet;
|
const { url } = packet;
|
||||||
|
|||||||
@@ -505,7 +505,6 @@ const AccessibleWalkerActor = ActorClassWithSpec(accessibleWalkerSpec, {
|
|||||||
* @param {Ci.nsIAccessibleEvent} subject
|
* @param {Ci.nsIAccessibleEvent} subject
|
||||||
* accessible event object.
|
* accessible event object.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
observe(subject) {
|
observe(subject) {
|
||||||
const event = subject.QueryInterface(Ci.nsIAccessibleEvent);
|
const event = subject.QueryInterface(Ci.nsIAccessibleEvent);
|
||||||
const rawAccessible = event.accessible;
|
const rawAccessible = event.accessible;
|
||||||
@@ -601,7 +600,6 @@ const AccessibleWalkerActor = ActorClassWithSpec(accessibleWalkerSpec, {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure that nothing interferes with the audit for an accessible object
|
* Ensure that nothing interferes with the audit for an accessible object
|
||||||
|
|||||||
@@ -463,7 +463,6 @@ var WebExtensionInspectedWindowActor = protocol.ActorClassWithSpec(
|
|||||||
* it is called over the remote debugging protocol the target window is always
|
* it is called over the remote debugging protocol the target window is always
|
||||||
* `targetActor.window`.
|
* `targetActor.window`.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
eval(callerInfo, expression, options, customTargetWindow) {
|
eval(callerInfo, expression, options, customTargetWindow) {
|
||||||
const window = customTargetWindow || this.window;
|
const window = customTargetWindow || this.window;
|
||||||
options = options || {};
|
options = options || {};
|
||||||
@@ -640,7 +639,6 @@ var WebExtensionInspectedWindowActor = protocol.ActorClassWithSpec(
|
|||||||
|
|
||||||
return {value: evalResult};
|
return {value: evalResult};
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ TouchSimulator.prototype = {
|
|||||||
this._isPicking = state;
|
this._isPicking = state;
|
||||||
},
|
},
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
handleEvent(evt) {
|
handleEvent(evt) {
|
||||||
// Bail out if devtools is in pick mode in the same tab.
|
// Bail out if devtools is in pick mode in the same tab.
|
||||||
if (this._isPicking) {
|
if (this._isPicking) {
|
||||||
@@ -243,7 +242,6 @@ TouchSimulator.prototype = {
|
|||||||
evt.stopImmediatePropagation();
|
evt.stopImmediatePropagation();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
fireMouseEvent(type, evt) {
|
fireMouseEvent(type, evt) {
|
||||||
const content = this.getContent(evt.target);
|
const content = this.getContent(evt.target);
|
||||||
|
|||||||
@@ -550,7 +550,6 @@ class FlexboxHighlighter extends AutoRefreshHighlighter {
|
|||||||
/**
|
/**
|
||||||
* Clear the whole alignment container along the main axis for each flex item.
|
* Clear the whole alignment container along the main axis for each flex item.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
renderJustifyContent() {
|
renderJustifyContent() {
|
||||||
if (!this.flexData || !this.currentQuads.content || !this.currentQuads.content[0]) {
|
if (!this.flexData || !this.currentQuads.content || !this.currentQuads.content[0]) {
|
||||||
return;
|
return;
|
||||||
@@ -631,7 +630,6 @@ class FlexboxHighlighter extends AutoRefreshHighlighter {
|
|||||||
|
|
||||||
this.ctx.restore();
|
this.ctx.restore();
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up the canvas with the given options prior to drawing.
|
* Set up the canvas with the given options prior to drawing.
|
||||||
@@ -826,7 +824,6 @@ function getRectFromFlexItemValues(item, container) {
|
|||||||
* The new Flex data object.
|
* The new Flex data object.
|
||||||
* @return {Boolean} true if the flex data has changed and false otherwise.
|
* @return {Boolean} true if the flex data has changed and false otherwise.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function compareFlexData(oldFlexData, newFlexData) {
|
function compareFlexData(oldFlexData, newFlexData) {
|
||||||
if (!oldFlexData || !newFlexData) {
|
if (!oldFlexData || !newFlexData) {
|
||||||
return true;
|
return true;
|
||||||
@@ -887,6 +884,5 @@ function compareFlexData(oldFlexData, newFlexData) {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
exports.FlexboxHighlighter = FlexboxHighlighter;
|
exports.FlexboxHighlighter = FlexboxHighlighter;
|
||||||
|
|||||||
@@ -478,7 +478,6 @@ class ShapesHighlighter extends AutoRefreshHighlighter {
|
|||||||
this.viewport = { left, right, top, bottom, padding };
|
this.viewport = { left, right, top, bottom, padding };
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
handleEvent(event, id) {
|
handleEvent(event, id) {
|
||||||
// No event handling if the highlighter is hidden
|
// No event handling if the highlighter is hidden
|
||||||
if (this.areShapesHidden()) {
|
if (this.areShapesHidden()) {
|
||||||
@@ -578,7 +577,6 @@ class ShapesHighlighter extends AutoRefreshHighlighter {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a mouse click in transform mode.
|
* Handle a mouse click in transform mode.
|
||||||
@@ -1706,7 +1704,6 @@ class ShapesHighlighter extends AutoRefreshHighlighter {
|
|||||||
* @returns {String} "top", "left", "right", or "bottom" if any of those edges were
|
* @returns {String} "top", "left", "right", or "bottom" if any of those edges were
|
||||||
* clicked. "" if none were clicked.
|
* clicked. "" if none were clicked.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
getInsetPointAt(pageX, pageY) {
|
getInsetPointAt(pageX, pageY) {
|
||||||
const { top, left, right, bottom } = this.coordinates;
|
const { top, left, right, bottom } = this.coordinates;
|
||||||
const zoom = getCurrentZoom(this.win);
|
const zoom = getCurrentZoom(this.win);
|
||||||
@@ -1744,7 +1741,6 @@ class ShapesHighlighter extends AutoRefreshHighlighter {
|
|||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the CSS definition given and returns the shape type associated
|
* Parses the CSS definition given and returns the shape type associated
|
||||||
|
|||||||
@@ -385,7 +385,6 @@ class DOMEventCollector extends MainEventCollector {
|
|||||||
* Get or detect jQuery events.
|
* Get or detect jQuery events.
|
||||||
*/
|
*/
|
||||||
class JQueryEventCollector extends MainEventCollector {
|
class JQueryEventCollector extends MainEventCollector {
|
||||||
/* eslint-disable complexity */
|
|
||||||
getListeners(node, {checkOnly} = {}) {
|
getListeners(node, {checkOnly} = {}) {
|
||||||
const jQuery = this.getJQuery(node);
|
const jQuery = this.getJQuery(node);
|
||||||
const handlers = [];
|
const handlers = [];
|
||||||
@@ -472,14 +471,12 @@ class JQueryEventCollector extends MainEventCollector {
|
|||||||
}
|
}
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get or detect jQuery live events.
|
* Get or detect jQuery live events.
|
||||||
*/
|
*/
|
||||||
class JQueryLiveEventCollector extends MainEventCollector {
|
class JQueryLiveEventCollector extends MainEventCollector {
|
||||||
/* eslint-disable complexity */
|
|
||||||
getListeners(node, {checkOnly} = {}) {
|
getListeners(node, {checkOnly} = {}) {
|
||||||
const jQuery = this.getJQuery(node);
|
const jQuery = this.getJQuery(node);
|
||||||
const handlers = [];
|
const handlers = [];
|
||||||
@@ -572,7 +569,6 @@ class JQueryLiveEventCollector extends MainEventCollector {
|
|||||||
}
|
}
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
normalizeListener(handlerDO) {
|
normalizeListener(handlerDO) {
|
||||||
function isFunctionInProxy(funcDO) {
|
function isFunctionInProxy(funcDO) {
|
||||||
@@ -870,7 +866,6 @@ class EventCollector {
|
|||||||
* native: false
|
* native: false
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
processHandlerForEvent(listenerArray, listener, dbg) {
|
processHandlerForEvent(listenerArray, listener, dbg) {
|
||||||
let globalDO;
|
let globalDO;
|
||||||
|
|
||||||
@@ -1018,7 +1013,6 @@ class EventCollector {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.EventCollector = EventCollector;
|
exports.EventCollector = EventCollector;
|
||||||
|
|||||||
@@ -728,7 +728,6 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
|
|||||||
* hasLast: true if the last child of the node is included in the list.
|
* hasLast: true if the last child of the node is included in the list.
|
||||||
* nodes: Array of DOMNodes.
|
* nodes: Array of DOMNodes.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_getChildren: function(node, options = {}) {
|
_getChildren: function(node, options = {}) {
|
||||||
if (isNodeDead(node)) {
|
if (isNodeDead(node)) {
|
||||||
return { hasFirst: true, hasLast: true, nodes: [] };
|
return { hasFirst: true, hasLast: true, nodes: [] };
|
||||||
@@ -902,7 +901,6 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
|
|||||||
|
|
||||||
return { hasFirst, hasLast, nodes };
|
return { hasFirst, hasLast, nodes };
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
getNativeAnonymousChildren: function(rawNode) {
|
getNativeAnonymousChildren: function(rawNode) {
|
||||||
// Get an anonymous walker and start on the first child.
|
// Get an anonymous walker and start on the first child.
|
||||||
@@ -1095,7 +1093,6 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
|
|||||||
* @param string selectorState
|
* @param string selectorState
|
||||||
* One of "pseudo", "id", "tag", "class", "null"
|
* One of "pseudo", "id", "tag", "class", "null"
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
getSuggestionsForQuery: function(query, completing, selectorState) {
|
getSuggestionsForQuery: function(query, completing, selectorState) {
|
||||||
const sugs = {
|
const sugs = {
|
||||||
classes: new Map(),
|
classes: new Map(),
|
||||||
@@ -1238,7 +1235,6 @@ var WalkerActor = protocol.ActorClassWithSpec(walkerSpec, {
|
|||||||
suggestions: result,
|
suggestions: result,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a pseudo-class lock to a node.
|
* Add a pseudo-class lock to a node.
|
||||||
|
|||||||
@@ -329,7 +329,6 @@ const proto = {
|
|||||||
* An object that maps property names to safe getter descriptors as
|
* An object that maps property names to safe getter descriptors as
|
||||||
* defined by the remote debugging protocol.
|
* defined by the remote debugging protocol.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
_findSafeGetterValues: function(ownProperties, limit = 0) {
|
_findSafeGetterValues: function(ownProperties, limit = 0) {
|
||||||
const safeGetterValues = Object.create(null);
|
const safeGetterValues = Object.create(null);
|
||||||
let obj = this.obj;
|
let obj = this.obj;
|
||||||
@@ -433,7 +432,6 @@ const proto = {
|
|||||||
|
|
||||||
return safeGetterValues;
|
return safeGetterValues;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the safe getters for a given Debugger.Object. Safe getters are native
|
* Find the safe getters for a given Debugger.Object. Safe getters are native
|
||||||
|
|||||||
@@ -355,7 +355,6 @@ function wrappedPrimitivePreviewer(className, classObj, objectActor, grip, rawOb
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
function GenericObject(objectActor, grip, rawObj, specialStringBehavior = false) {
|
function GenericObject(objectActor, grip, rawObj, specialStringBehavior = false) {
|
||||||
const {obj, hooks} = objectActor;
|
const {obj, hooks} = objectActor;
|
||||||
if (grip.preview || grip.displayString || hooks.getGripDepth() > 1) {
|
if (grip.preview || grip.displayString || hooks.getGripDepth() > 1) {
|
||||||
@@ -443,7 +442,6 @@ function GenericObject(objectActor, grip, rawObj, specialStringBehavior = false)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
// Preview functions that do not rely on the object class.
|
// Preview functions that do not rely on the object class.
|
||||||
previewers.Object = [
|
previewers.Object = [
|
||||||
@@ -674,7 +672,6 @@ previewers.Object = [
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
/* eslint-disable complexity */
|
|
||||||
function DOMEvent({obj, hooks}, grip, rawObj) {
|
function DOMEvent({obj, hooks}, grip, rawObj) {
|
||||||
if (isWorker || !rawObj || !Event.isInstance(rawObj)) {
|
if (isWorker || !rawObj || !Event.isInstance(rawObj)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -761,7 +758,6 @@ previewers.Object = [
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
function DOMException({obj, hooks}, grip, rawObj) {
|
function DOMException({obj, hooks}, grip, rawObj) {
|
||||||
if (isWorker || !rawObj || obj.class !== "DOMException") {
|
if (isWorker || !rawObj || obj.class !== "DOMException") {
|
||||||
|
|||||||
@@ -835,7 +835,6 @@ var cookieHelpers = {
|
|||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
editCookie(data) {
|
editCookie(data) {
|
||||||
let {field, oldValue, newValue} = data;
|
let {field, oldValue, newValue} = data;
|
||||||
const origName = field === "name" ? oldValue : data.items.name;
|
const origName = field === "name" ? oldValue : data.items.name;
|
||||||
@@ -921,7 +920,6 @@ var cookieHelpers = {
|
|||||||
cookie.sameSite
|
cookie.sameSite
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
_removeCookies(host, opts = {}) {
|
_removeCookies(host, opts = {}) {
|
||||||
// We use a uniqueId to emulate compound keys for cookies. We need to
|
// We use a uniqueId to emulate compound keys for cookies. We need to
|
||||||
@@ -2777,7 +2775,6 @@ const StorageActor = protocol.ActorClassWithSpec(specs.storageSpec, {
|
|||||||
* Pass an empty array if the host itself was affected: either completely
|
* Pass an empty array if the host itself was affected: either completely
|
||||||
* removed or cleared.
|
* removed or cleared.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
update(action, storeType, data) {
|
update(action, storeType, data) {
|
||||||
if (action == "cleared") {
|
if (action == "cleared") {
|
||||||
this.emit("stores-cleared", { [storeType]: data });
|
this.emit("stores-cleared", { [storeType]: data });
|
||||||
@@ -2842,7 +2839,6 @@ const StorageActor = protocol.ActorClassWithSpec(specs.storageSpec, {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method removes data from the this.boundUpdate object in the same
|
* This method removes data from the this.boundUpdate object in the same
|
||||||
|
|||||||
@@ -534,7 +534,6 @@ WebConsoleActor.prototype =
|
|||||||
* @return object
|
* @return object
|
||||||
* The response object which holds the startedListeners array.
|
* The response object which holds the startedListeners array.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
startListeners: async function(request) {
|
startListeners: async function(request) {
|
||||||
const startedListeners = [];
|
const startedListeners = [];
|
||||||
const window = !this.parentActor.isRootActor ? this.window : null;
|
const window = !this.parentActor.isRootActor ? this.window : null;
|
||||||
@@ -693,7 +692,6 @@ WebConsoleActor.prototype =
|
|||||||
traits: this.traits,
|
traits: this.traits,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for the "stopListeners" request.
|
* Handler for the "stopListeners" request.
|
||||||
@@ -987,7 +985,6 @@ WebConsoleActor.prototype =
|
|||||||
* @return object
|
* @return object
|
||||||
* The evaluation response packet.
|
* The evaluation response packet.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
evaluateJS: function(request) {
|
evaluateJS: function(request) {
|
||||||
const input = request.text;
|
const input = request.text;
|
||||||
const timestamp = Date.now();
|
const timestamp = Date.now();
|
||||||
@@ -1157,7 +1154,6 @@ WebConsoleActor.prototype =
|
|||||||
notes: errorNotes,
|
notes: errorNotes,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Autocomplete request handler.
|
* The Autocomplete request handler.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
// this file violates some naming conventions and consequently locally
|
// this file violates some naming conventions and consequently locally
|
||||||
// disables some eslint rules.
|
// disables some eslint rules.
|
||||||
|
|
||||||
/* eslint-disable camelcase, mozilla/no-aArgs, no-else-return, complexity */
|
/* eslint-disable camelcase, mozilla/no-aArgs, no-else-return */
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|||||||
@@ -539,7 +539,6 @@ function parseNamedDeclarations(isCssPropertyKnown, inputString,
|
|||||||
* @return {Array} an array of objects with the following signature:
|
* @return {Array} an array of objects with the following signature:
|
||||||
* [{ "value": string, "type": integer }, ...]
|
* [{ "value": string, "type": integer }, ...]
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function parsePseudoClassesAndAttributes(value) {
|
function parsePseudoClassesAndAttributes(value) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
throw new Error("empty input string");
|
throw new Error("empty input string");
|
||||||
@@ -625,7 +624,6 @@ function parsePseudoClassesAndAttributes(value) {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expects a single CSS value to be passed as the input and parses the value
|
* Expects a single CSS value to be passed as the input and parses the value
|
||||||
|
|||||||
@@ -258,7 +258,6 @@ class WalkerFront extends FrontClassWithSpec(walkerSpec) {
|
|||||||
* Get any unprocessed mutation records and process them.
|
* Get any unprocessed mutation records and process them.
|
||||||
*/
|
*/
|
||||||
getMutations(options = {}) {
|
getMutations(options = {}) {
|
||||||
/* eslint-disable complexity */
|
|
||||||
return super.getMutations(options).then(mutations => {
|
return super.getMutations(options).then(mutations => {
|
||||||
const emitMutations = [];
|
const emitMutations = [];
|
||||||
for (const change of mutations) {
|
for (const change of mutations) {
|
||||||
@@ -402,7 +401,6 @@ class WalkerFront extends FrontClassWithSpec(walkerSpec) {
|
|||||||
|
|
||||||
this.emit("mutations", emitMutations);
|
this.emit("mutations", emitMutations);
|
||||||
});
|
});
|
||||||
/* eslint-enable complexity */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -180,7 +180,6 @@ function getLineCountInComments(text) {
|
|||||||
* @param string text The CSS source to prettify.
|
* @param string text The CSS source to prettify.
|
||||||
* @return string Prettified CSS source
|
* @return string Prettified CSS source
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function prettifyCSS(text, ruleCount) {
|
function prettifyCSS(text, ruleCount) {
|
||||||
if (prettifyCSS.LINE_SEPARATOR == null) {
|
if (prettifyCSS.LINE_SEPARATOR == null) {
|
||||||
const os = Services.appinfo.OS;
|
const os = Services.appinfo.OS;
|
||||||
@@ -406,7 +405,6 @@ function prettifyCSS(text, ruleCount) {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
exports.prettifyCSS = prettifyCSS;
|
exports.prettifyCSS = prettifyCSS;
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ function hasArrayIndex(str) {
|
|||||||
* element access (e.g. `x["match`).
|
* element access (e.g. `x["match`).
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
/* eslint-disable complexity */
|
|
||||||
function analyzeInputString(str) {
|
function analyzeInputString(str) {
|
||||||
const bodyStack = [];
|
const bodyStack = [];
|
||||||
|
|
||||||
@@ -196,7 +195,6 @@ function analyzeInputString(str) {
|
|||||||
|
|
||||||
return buildReturnObject();
|
return buildReturnObject();
|
||||||
}
|
}
|
||||||
/* eslint-enable complexity */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a list of properties, that are possible matches based on the passed
|
* Provides a list of properties, that are possible matches based on the passed
|
||||||
|
|||||||
Reference in New Issue
Block a user