From 82e49f10869c8824b797bcb923d8a3d7dff43971 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Mon, 3 Apr 2023 10:23:52 +0000 Subject: [PATCH] Bug 1825739 - Replace generic ESLint disable statements with specific and prettier ones in devtools. r=devtools-reviewers,nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D174225 --- .eslintignore | 6 +++++ .prettierignore | 17 +++++++------- .../src/selectors/getCallStackFrames.js | 3 +-- ..._toolbox_toolbar_reorder_with_extension.js | 10 +++++--- .../browser_markup_image_tooltip_mutations.js | 3 +-- ..._shadowdom_open_debugger_pretty_printed.js | 4 ++-- .../inspector/markup/test/helper_diff.js | 2 -- .../test/shadowdom_open_debugger.min.js | 1 - .../shared/test/browser_outputparser.js | 20 +++++----------- .../browser/test-click-function-to-source.js | 2 +- .../test-click-function-to-source.min.js | 2 +- ...t-click-function-to-source.unmapped.min.js | 2 +- .../browser/test-external-script-errors.js | 2 -- .../test-message-categories-canvas-css.js | 2 -- ...message-categories-empty-getelementbyid.js | 2 -- .../test/browser/test-sourcemap-original.js | 2 +- .../test/browser/test-sourcemap.min.js | 4 ++-- .../tests/xpcshell/test_blackboxing-01.js | 5 ++-- .../tests/xpcshell/test_breakpoint-01.js | 3 +-- .../tests/xpcshell/test_breakpoint-03.js | 19 ++++++++------- .../tests/xpcshell/test_breakpoint-04.js | 3 +-- .../tests/xpcshell/test_breakpoint-05.js | 3 +-- .../tests/xpcshell/test_breakpoint-06.js | 3 +-- .../tests/xpcshell/test_breakpoint-07.js | 3 +-- .../tests/xpcshell/test_breakpoint-08.js | 4 ++-- .../tests/xpcshell/test_breakpoint-09.js | 23 +++++++++---------- .../tests/xpcshell/test_breakpoint-10.js | 17 +++++++------- .../tests/xpcshell/test_breakpoint-11.js | 13 +++++------ .../tests/xpcshell/test_breakpoint-14.js | 21 ++++++++--------- .../tests/xpcshell/test_breakpoint-16.js | 13 +++++------ .../tests/xpcshell/test_breakpoint-19.js | 5 ++-- .../tests/xpcshell/test_breakpoint-21.js | 4 +++- .../xpcshell/test_ignore_caught_exceptions.js | 3 +-- .../test_ignore_no_interface_exceptions.js | 3 +-- .../xpcshell/test_pause_exceptions-01.js | 5 ++-- .../xpcshell/test_pause_exceptions-02.js | 4 ++-- .../xpcshell/test_pause_exceptions-03.js | 3 +-- .../xpcshell/test_pause_exceptions-04.js | 3 +-- .../tests/xpcshell/test_promise_state-01.js | 5 ++-- .../tests/xpcshell/test_promise_state-02.js | 5 ++-- .../tests/xpcshell/test_promise_state-03.js | 5 ++-- .../server/tests/xpcshell/test_stepping-02.js | 3 +-- .../server/tests/xpcshell/test_stepping-03.js | 3 +-- .../server/tests/xpcshell/test_stepping-04.js | 3 +-- .../test_stepping-with-skip-breakpoints.js | 3 +-- .../server/tests/xpcshell/test_symbols-01.js | 5 ++-- .../server/tests/xpcshell/test_symbols-02.js | 5 ++-- .../xpcshell/test_ReadHeapSnapshot_worker.js | 5 ++-- .../xpcshell/test_getCensusIndividuals_01.js | 3 +-- tools/rewriting/ThirdPartyPaths.txt | 1 + 50 files changed, 136 insertions(+), 154 deletions(-) diff --git a/.eslintignore b/.eslintignore index 169e70916ef7..883e6dae8654 100644 --- a/.eslintignore +++ b/.eslintignore @@ -87,6 +87,12 @@ devtools/client/webconsole/test/browser/code_bundle_nosource.js devtools/client/webconsole/test/browser/code_bundle_invalidmap.js devtools/client/webconsole/test/browser/test-autocomplete-mapped.js devtools/client/webconsole/test/browser/test-autocomplete-mapped.src.js +devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js +devtools/client/webconsole/test/browser/test-click-function-to-source*.js +devtools/client/webconsole/test/browser/test-external-script-errors.js +devtools/client/webconsole/test/browser/test-message-categories-canvas-css.js +devtools/client/webconsole/test/browser/test-message-categories-empty-getelementbyid.js +devtools/client/webconsole/test/browser/test-sourcemap*.js devtools/server/tests/xpcshell/setBreakpoint* devtools/server/tests/xpcshell/sourcemapped.js diff --git a/.prettierignore b/.prettierignore index 21059c8bbdbb..4608144eb100 100644 --- a/.prettierignore +++ b/.prettierignore @@ -42,18 +42,17 @@ dom/base/test/file_bug687859-charset.js dom/base/test/file_bug687859-inherit.js # Ignore devtools debugger files -# Keep in sync with devtools/client/debugger/.prettierignore -devtools/client/debugger/src/workers/parser/tests/fixtures/functionNames.js -devtools/client/debugger/src/workers/parser/tests/fixtures/scopes/*.js -devtools/client/debugger/src/workers/parser/tests/fixtures/pause/*.js -devtools/client/debugger/src/test/mochitest/examples/babel/polyfill-bundle.js -devtools/client/debugger/src/test/mochitest/examples/babel/fixtures/*/input.js -devtools/client/debugger/src/test/mochitest/examples/babel/fixtures/*/output.js -devtools/client/debugger/src/test/mochitest/examples/babel/fixtures/*/output.js.map -devtools/client/debugger/src/test/mochitest/examples/ember/quickstart +devtools/client/debugger/src/test/examples/** +devtools/client/debugger/src/test/integration/** +devtools/client/debugger/src/test/unit-sources/** +devtools/client/debugger/src/**/fixtures/** +devtools/client/debugger/src/test/mochitest/** # These are source mapped and the locations are asserted in the test case. devtools/client/webconsole/test/browser/test-mangled-function.* +# This file is based on another and we want to keep the syntax the same. +devtools/shared/plural-form.js + # Ignore backgroundtasks preferences files. toolkit/components/backgroundtasks/defaults diff --git a/devtools/client/debugger/src/selectors/getCallStackFrames.js b/devtools/client/debugger/src/selectors/getCallStackFrames.js index 476408e980f3..558e07aa17a7 100644 --- a/devtools/client/debugger/src/selectors/getCallStackFrames.js +++ b/devtools/client/debugger/src/selectors/getCallStackFrames.js @@ -45,8 +45,7 @@ export function formatCallStackFrames( return annotateFrames(formattedFrames); } -// eslint-disable-next-line -export const getCallStackFrames = (createSelector)( +export const getCallStackFrames = createSelector( getCurrentThreadFrames, getSelectedSource, getBlackBoxRanges, diff --git a/devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js b/devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js index de4259cc85dd..3641a075e046 100644 --- a/devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js +++ b/devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js @@ -46,9 +46,13 @@ add_task(async function() { `, "extension.js": async () => { - // eslint-disable-next-line - await browser.devtools.panels.create("extension", "fake-icon.png", "empty.html"); - // eslint-disable-next-line + // eslint-disable-next-line no-undef + await browser.devtools.panels.create( + "extension", + "fake-icon.png", + "empty.html" + ); + // eslint-disable-next-line no-undef browser.test.sendMessage("devtools-page-ready"); }, "empty.html": "", diff --git a/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js b/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js index f180c12d8a4d..9498795ad351 100644 --- a/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js +++ b/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js @@ -6,9 +6,8 @@ // Test that image preview tooltip shows updated content when the image src // changes. -/*eslint-disable */ +// prettier-ignore const INITIAL_SRC = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADI5JREFUeNrsWwuQFNUVPf1m5z87szv7HWSWj8CigBFMEFZKiQsB1PgJwUAZg1HBpIQsKmokEhNjWUnFVPnDWBT+KolJYbRMoqUVq0yCClpqiX8sCchPWFwVlt2db7+X93pez7zu6Vn2NxsVWh8987p7pu+9555z7+tZjTGGY3kjOMa34w447oBjfKsY7i/UNM3Y8eFSAkD50Plgw03K5P9gvGv7U5ieeR3PszeREiPNX3/0DL4hjslzhm8THh+OITfXk3dhiv4GDtGPVzCaeJmPLYzuu5qJuWfuw2QTlcN1X9pwQU7LhdZ/ZAseD45cOh9hHvDkc/yAF/DNhdb5Mrr3PvBMaAYW8fMSIi2G497IMEK/YutGtAYr6+ej+nxu/NN8Ks3N7AR6HgcLz0Eg1Ljg1UcxZzi5qewIkMYLRweTr2Kzp+nmyXAd5pS3XQDd+N/4h4zgu9FI7brlXf90nMEnuwQxlvv+hosE3TuexmWeysmT4W+W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Dpz6z9fV8bkyIkqBFkhej0Ib+ZQ34XJK9AfozaiimqIoX3Jp3tiISrcfYpuN2+iFph/02P36PNC9fVcCnp6H9jYouKyfaWufz5Tp9tVxcUniw7IohZv4dZz81/ns67z3AYPrc2n0+Ix2q8k0PWjgBy88XaibnfK9A+5LdDY2Ivhy36fbT8Zv3Lb1U1qLqUxorXEEXIs0mjjrtxoTZWtdvigNs2sgPiujTv6DIZLld6b/V5742JZV3fUsUVFy5gdsNtKWFzUCEVbNepD1MkSMVbsb6SZm7jI3/zODtQKgUMsOw8wDZ63t5xcV1TnaEAxoc6wrqY+Fj+N4DsqOnhOIdicrQSm1MPYCPlIqHn5bbHg8/bj2D3QfZnCX3mpAICDZV8jH5kpbZqTD0W+DxaA74CWzLN2nd14OlL72J38Lf7+TjC7dadZFDoZJQPrtaIKL/G0L6ktptPZVJ8fMqHYPZOKYPMyQGadIJfDvdXwAFiZOTvDBPydf5vk4rWA+RfdhBlaF/yDDBRoMu9pfnSjv/p7DG+HXfAcQcc49v/BBgAcFAO4DmB2GQAAAAASUVORK5CYII="; -/* eslint-enable */ const UPDATED_SRC = URL_ROOT + "doc_markup_tooltip.png"; diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js index 92bb4b134c87..aef429c16af2 100644 --- a/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js +++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js @@ -34,7 +34,7 @@ add_task(async function() { const dbg = createDebuggerContext(toolbox); await waitForSelectedSource(dbg, "shadowdom_open_debugger.min.js"); - await waitForSelectedLocation(dbg, 2); + await waitForSelectedLocation(dbg, 1); info("Pretty-print source."); clickElement(dbg, "prettyPrintButton"); @@ -49,5 +49,5 @@ add_task(async function() { customBadge.click(); await waitForSelectedSource(dbg, "shadowdom_open_debugger.min.js:formatted"); - await waitForSelectedLocation(dbg, 4); + await waitForSelectedLocation(dbg, 3); }); diff --git a/devtools/client/inspector/markup/test/helper_diff.js b/devtools/client/inspector/markup/test/helper_diff.js index a405e585891e..5a97fa548d46 100644 --- a/devtools/client/inspector/markup/test/helper_diff.js +++ b/devtools/client/inspector/markup/test/helper_diff.js @@ -25,8 +25,6 @@ * THE SOFTWARE. */ -/* eslint-disable */ - /** * USAGE: * diff(text1, text2); diff --git a/devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js b/devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js index 86208529baf9..6796d44f0799 100644 --- a/devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js +++ b/devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js @@ -1,2 +1 @@ -/* eslint-disable */ "use strict";customElements.define("test-component",class extends HTMLElement{constructor(){super();let shadowRoot=this.attachShadow({mode:"open"});shadowRoot.innerHTML="some default content"}connectedCallback(){}disconnectedCallback(){}}); diff --git a/devtools/client/shared/test/browser_outputparser.js b/devtools/client/shared/test/browser_outputparser.js index 2bce81ad2605..01b5229bdf2a 100644 --- a/devtools/client/shared/test/browser_outputparser.js +++ b/devtools/client/shared/test/browser_outputparser.js @@ -81,13 +81,12 @@ function makeColorTest(name, value, segments) { .map(([attr, v]) => `${attr}="${v}"`) .join(" "); - /* eslint-disable */ + // prettier-ignore result.expected += `` + ``+ `${segment.name}` + ``; - /* eslint-enable */ } } @@ -147,9 +146,7 @@ function testParseCssProperty(doc, parser) { // Test a very long property. makeColorTest( "background-image", - /* eslint-disable max-len */ "linear-gradient(to left, transparent 0, transparent 5%,#F00 0, #F00 10%,#FF0 0, #FF0 15%,#0F0 0, #0F0 20%,#0FF 0, #0FF 25%,#00F 0, #00F 30%,#800 0, #800 35%,#880 0, #880 40%,#080 0, #080 45%,#088 0, #088 50%,#008 0, #008 55%,#FFF 0, #FFF 60%,#EEE 0, #EEE 65%,#CCC 0, #CCC 70%,#999 0, #999 75%,#666 0, #666 80%,#333 0, #333 85%,#111 0, #111 90%,#000 0, #000 95%,transparent 0, transparent 100%)", - /* eslint-enable max-len */ [ "linear-gradient(to left, ", { name: "transparent", colorFunction: "linear-gradient" }, @@ -548,29 +545,27 @@ function testParseVariable(doc, parser) { text: "var(--seen)", variables: { "--seen": "chartreuse" }, expected: - /* eslint-disable */ + // prettier-ignore '' + "var(" + '--seen)' + "" + "", - /* eslint-enable */ }, { text: "var(--not-seen)", variables: {}, expected: - /* eslint-disable */ + // prettier-ignore "var(" + '--not-seen' + ")", - /* eslint-enable */ }, { text: "var(--seen, seagreen)", variables: { "--seen": "chartreuse" }, expected: - /* eslint-disable */ + // prettier-ignore '' + "var(" + '--seen,' + @@ -581,13 +576,12 @@ function testParseVariable(doc, parser) { ")" + "" + "", - /* eslint-enable */ }, { text: "var(--not-seen, var(--seen))", variables: { "--seen": "chartreuse" }, expected: - /* eslint-disable */ + // prettier-ignore "var(" + '--not-seen,' + " " + @@ -598,13 +592,12 @@ function testParseVariable(doc, parser) { "" + ")" + "", - /* eslint-enable */ }, { text: "color-mix(in sgrb, var(--x), purple)", variables: { "--x": "yellow" }, expected: - /* eslint-disable */ + // prettier-ignore `color-mix(in sgrb, ` + `` + `` + @@ -618,7 +611,6 @@ function testParseVariable(doc, parser) { `purple` + `` + `)`, - /* eslint-enable */ parserExtraOptions: { colorSwatchClass: COLOR_TEST_CLASS, }, diff --git a/devtools/client/webconsole/test/browser/test-click-function-to-source.js b/devtools/client/webconsole/test/browser/test-click-function-to-source.js index 92e1644f25e2..c73390bae30c 100644 --- a/devtools/client/webconsole/test/browser/test-click-function-to-source.js +++ b/devtools/client/webconsole/test/browser/test-click-function-to-source.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +// prettier-ignore /** * this diff --git a/devtools/client/webconsole/test/browser/test-click-function-to-source.min.js b/devtools/client/webconsole/test/browser/test-click-function-to-source.min.js index b12ddee364d8..7516de7e8f6b 100644 --- a/devtools/client/webconsole/test/browser/test-click-function-to-source.min.js +++ b/devtools/client/webconsole/test/browser/test-click-function-to-source.min.js @@ -1,3 +1,3 @@ -/* eslint-disable */ +// prettier-ignore function foo(){console.log(foo)} //# sourceMappingURL=test-click-function-to-source.min.js.map diff --git a/devtools/client/webconsole/test/browser/test-click-function-to-source.unmapped.min.js b/devtools/client/webconsole/test/browser/test-click-function-to-source.unmapped.min.js index 1d6237b5eb4b..e06d1a4dba49 100644 --- a/devtools/client/webconsole/test/browser/test-click-function-to-source.unmapped.min.js +++ b/devtools/client/webconsole/test/browser/test-click-function-to-source.unmapped.min.js @@ -1,2 +1,2 @@ -/* eslint-disable */ +// prettier-ignore function foo(){console.log(foo)} diff --git a/devtools/client/webconsole/test/browser/test-external-script-errors.js b/devtools/client/webconsole/test/browser/test-external-script-errors.js index 2a87f9a0351c..e386d91ce9e2 100644 --- a/devtools/client/webconsole/test/browser/test-external-script-errors.js +++ b/devtools/client/webconsole/test/browser/test-external-script-errors.js @@ -1,8 +1,6 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -/* eslint-disable */ - function f() { bogus.g(); } diff --git a/devtools/client/webconsole/test/browser/test-message-categories-canvas-css.js b/devtools/client/webconsole/test/browser/test-message-categories-canvas-css.js index e126c5b59b59..94e445d11cb1 100644 --- a/devtools/client/webconsole/test/browser/test-message-categories-canvas-css.js +++ b/devtools/client/webconsole/test/browser/test-message-categories-canvas-css.js @@ -1,8 +1,6 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -/* eslint-disable */ - window.addEventListener("DOMContentLoaded", function () { var canvas = document.querySelector("canvas"); var context = canvas.getContext("2d"); diff --git a/devtools/client/webconsole/test/browser/test-message-categories-empty-getelementbyid.js b/devtools/client/webconsole/test/browser/test-message-categories-empty-getelementbyid.js index e861359d1805..353ab4b2a3c1 100644 --- a/devtools/client/webconsole/test/browser/test-message-categories-empty-getelementbyid.js +++ b/devtools/client/webconsole/test/browser/test-message-categories-empty-getelementbyid.js @@ -1,8 +1,6 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -/* eslint-disable */ - window.addEventListener("load", function () { document.getElementById(""); }); diff --git a/devtools/client/webconsole/test/browser/test-sourcemap-original.js b/devtools/client/webconsole/test/browser/test-sourcemap-original.js index 107d2a01b638..a506631cfb58 100644 --- a/devtools/client/webconsole/test/browser/test-sourcemap-original.js +++ b/devtools/client/webconsole/test/browser/test-sourcemap-original.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +// prettier-ignore /** * this diff --git a/devtools/client/webconsole/test/browser/test-sourcemap.min.js b/devtools/client/webconsole/test/browser/test-sourcemap.min.js index 957a85ffd2ad..9d4808ec6b36 100644 --- a/devtools/client/webconsole/test/browser/test-sourcemap.min.js +++ b/devtools/client/webconsole/test/browser/test-sourcemap.min.js @@ -1,3 +1,3 @@ -/* eslint-disable */ +// prettier-ignore function logString(str){console.log(str)}function logTrace(){var logTraceInner=function(){console.trace()};logTraceInner()} -//# sourceMappingURL=test-sourcemap.min.js.map \ No newline at end of file +//# sourceMappingURL=test-sourcemap.min.js.map diff --git a/devtools/server/tests/xpcshell/test_blackboxing-01.js b/devtools/server/tests/xpcshell/test_blackboxing-01.js index 8516c7a4ca13..7b2a87f3fc14 100644 --- a/devtools/server/tests/xpcshell/test_blackboxing-01.js +++ b/devtools/server/tests/xpcshell/test_blackboxing-01.js @@ -97,7 +97,8 @@ const testBlackBox = async function() { }; function evalCode() { - /* eslint-disable */ + /* eslint-disable mozilla/var-only-at-top-level, no-undef */ + // prettier-ignore Cu.evalInSandbox( "" + function doStuff(k) { // line 1 var arg = 15; // line 2 - Step in here @@ -109,6 +110,7 @@ function evalCode() { 1 ); + // prettier-ignore Cu.evalInSandbox( "" + function runTest() { // line 1 doStuff( // line 2 - Break here @@ -124,7 +126,6 @@ function evalCode() { SOURCE_URL, 1 ); - /* eslint-enable */ } const runTest = async function(onSteppedLocation, onDebuggerStatementFrames) { diff --git a/devtools/server/tests/xpcshell/test_breakpoint-01.js b/devtools/server/tests/xpcshell/test_breakpoint-01.js index 2e328aa170d3..be46d97cfb6c 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-01.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-01.js @@ -41,7 +41,7 @@ function evaluateTestCode(debuggee) { * along with the debuggee's. */ do_timeout(0, () => { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( "var line0 = Error().lineNumber;\n" + "debugger;\n" + // line0 + 1 @@ -49,6 +49,5 @@ function evaluateTestCode(debuggee) { "var b = 2;\n", // line0 + 3 debuggee ); - /* eslint-enable */ }); } diff --git a/devtools/server/tests/xpcshell/test_breakpoint-03.js b/devtools/server/tests/xpcshell/test_breakpoint-03.js index 15285afd505f..48aae49d6706 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-03.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-03.js @@ -60,16 +60,15 @@ add_task( // Use `evalInSandbox` to make the debugger treat it as normal // globally-scoped code, where breakpoint sliding rules apply. - /* eslint-disable */ - Cu.evalInSandbox( - "var line0 = Error().lineNumber;\n" + - "debugger;\n" + // line0 + 1 - "var a = 1;\n" + // line0 + 2 - "// A comment.\n" + // line0 + 3 - "var b = 2;", // line0 + 4 - debuggee - ); - /* eslint-enable */ + // prettier-ignore + Cu.evalInSandbox( + "var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "var a = 1;\n" + // line0 + 2 + "// A comment.\n" + // line0 + 3 + "var b = 2;", // line0 + 4 + debuggee + ); }); }) ); diff --git a/devtools/server/tests/xpcshell/test_breakpoint-04.js b/devtools/server/tests/xpcshell/test_breakpoint-04.js index f2015bbd97f6..8b7137f85df7 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-04.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-04.js @@ -42,7 +42,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( "var line0 = Error().lineNumber;\n" + "function foo() {\n" + // line0 + 1 @@ -53,5 +53,4 @@ function evaluateTestCode(debuggee) { "foo();\n", // line0 + 6 debuggee ); - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_breakpoint-05.js b/devtools/server/tests/xpcshell/test_breakpoint-05.js index b916428c9593..882227dd59c7 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-05.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-05.js @@ -45,7 +45,7 @@ add_task( }); }); - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( "var line0 = Error().lineNumber;\n" + "function foo() {\n" + // line0 + 1 @@ -57,7 +57,6 @@ add_task( "foo();\n", // line0 + 7 debuggee ); - /* eslint-enable */ }); }) ); diff --git a/devtools/server/tests/xpcshell/test_breakpoint-06.js b/devtools/server/tests/xpcshell/test_breakpoint-06.js index bc15bb608a3c..79f4ee7794f4 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-06.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-06.js @@ -45,7 +45,7 @@ add_task( }); }); - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( "var line0 = Error().lineNumber;\n" + "function foo() {\n" + // line0 + 1 @@ -63,7 +63,6 @@ add_task( "foo();\n", // line0 + 13 debuggee ); - /* eslint-enable */ }); }) ); diff --git a/devtools/server/tests/xpcshell/test_breakpoint-07.js b/devtools/server/tests/xpcshell/test_breakpoint-07.js index 4a1122af4c3e..6d6ffe428d18 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-07.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-07.js @@ -45,7 +45,7 @@ add_task( }); }); - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( "var line0 = Error().lineNumber;\n" + "function foo() {\n" + // line0 + 1 @@ -60,7 +60,6 @@ add_task( "foo();\n", // line0 + 10 debuggee ); - /* eslint-enable */ }); }) ); diff --git a/devtools/server/tests/xpcshell/test_breakpoint-08.js b/devtools/server/tests/xpcshell/test_breakpoint-08.js index eac82a22f93a..868a9575f133 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-08.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-08.js @@ -52,7 +52,7 @@ add_task( threadFront.resume(); }); - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + "function foo() {\n" + // line0 + 1 " this.a = 1;\n" + // line0 + 2 @@ -63,13 +63,13 @@ add_task( "1.7", "script1.js"); + // prettier-ignore Cu.evalInSandbox("var line1 = Error().lineNumber;\n" + "debugger;\n" + // line1 + 1 "foo();\n", // line1 + 2 debuggee, "1.7", "script2.js"); - /* eslint-enable */ }); }) ); diff --git a/devtools/server/tests/xpcshell/test_breakpoint-09.js b/devtools/server/tests/xpcshell/test_breakpoint-09.js index 9afc5185a530..dcd957189e3f 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-09.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-09.js @@ -55,18 +55,17 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ - Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + - "function foo(stop) {\n" + // line0 + 1 - " this.a = 1;\n" + // line0 + 2 - " if (stop) return;\n" + // line0 + 3 - " delete this.a;\n" + // line0 + 4 - " foo(true);\n" + // line0 + 5 - "}\n" + // line0 + 6 - "debugger;\n" + // line0 + 7 - "foo();\n", // line0 + 8 - debuggee); - /* eslint-enable */ + // prettier-ignore + Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + + "function foo(stop) {\n" + // line0 + 1 + " this.a = 1;\n" + // line0 + 2 + " if (stop) return;\n" + // line0 + 3 + " delete this.a;\n" + // line0 + 4 + " foo(true);\n" + // line0 + 5 + "}\n" + // line0 + 6 + "debugger;\n" + // line0 + 7 + "foo();\n", // line0 + 8 + debuggee); if (!done) { Assert.ok(false); } diff --git a/devtools/server/tests/xpcshell/test_breakpoint-10.js b/devtools/server/tests/xpcshell/test_breakpoint-10.js index ca6b74f94cad..fd114f173d81 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-10.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-10.js @@ -70,13 +70,12 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ - Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + - "debugger;\n" + // line0 + 1 - "var a, i = 0;\n" + // line0 + 2 - "for (i = 1; i <= 2; i++) {\n" + // line0 + 3 - " a = i;\n" + // line0 + 4 - "}\n", // line0 + 5 - debuggee); - /* eslint-enable */ + // prettier-ignore + Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "var a, i = 0;\n" + // line0 + 2 + "for (i = 1; i <= 2; i++) {\n" + // line0 + 3 + " a = i;\n" + // line0 + 4 + "}\n", // line0 + 5 + debuggee); } diff --git a/devtools/server/tests/xpcshell/test_breakpoint-11.js b/devtools/server/tests/xpcshell/test_breakpoint-11.js index 792c6cfb7b06..a29cd2f768ed 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-11.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-11.js @@ -68,11 +68,10 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ - Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + - "debugger;\n" + // line0 + 1 - "var a = { b: 1, f: function() { return 2; } };\n" + // line0+2 - "var res = a.f();\n", // line0 + 3 - debuggee); - /* eslint-enable */ + // prettier-ignore + Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + + "debugger;\n" + // line0 + 1 + "var a = { b: 1, f: function() { return 2; } };\n" + // line0+2 + "var res = a.f();\n", // line0 + 3 + debuggee); } diff --git a/devtools/server/tests/xpcshell/test_breakpoint-14.js b/devtools/server/tests/xpcshell/test_breakpoint-14.js index 2bcd31c8aa35..d68f70490985 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-14.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-14.js @@ -77,15 +77,14 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ - Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + - "function foo() {\n" + // line0 + 1 - " this.a = 1;\n" + // line0 + 2 <-- Breakpoint is set here. - "}\n" + // line0 + 3 - "debugger;\n" + // line0 + 4 - "foo();\n" + // line0 + 5 - "debugger;\n" + // line0 + 6 - "var b = 2;\n", // line0 + 7 - debuggee); - /* eslint-enable */ + // prettier-ignore + Cu.evalInSandbox("var line0 = Error().lineNumber;\n" + + "function foo() {\n" + // line0 + 1 + " this.a = 1;\n" + // line0 + 2 <-- Breakpoint is set here. + "}\n" + // line0 + 3 + "debugger;\n" + // line0 + 4 + "foo();\n" + // line0 + 5 + "debugger;\n" + // line0 + 6 + "var b = 2;\n", // line0 + 7 + debuggee); } diff --git a/devtools/server/tests/xpcshell/test_breakpoint-16.js b/devtools/server/tests/xpcshell/test_breakpoint-16.js index e0aebf7e9147..a42306eee11e 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-16.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-16.js @@ -44,13 +44,12 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ - Cu.evalInSandbox( - "var line0 = Error().lineNumber;\n" + - "(function () { debugger; this.acc = 0; for (var i = 0; i < 3; i++) this.acc++; }());", - debuggee - ); - /* eslint-enable */ + // prettier-ignore + Cu.evalInSandbox( + "var line0 = Error().lineNumber;\n" + + "(function () { debugger; this.acc = 0; for (var i = 0; i < 3; i++) this.acc++; }());", + debuggee + ); } async function testAssertions( diff --git a/devtools/server/tests/xpcshell/test_breakpoint-19.js b/devtools/server/tests/xpcshell/test_breakpoint-19.js index be26ffafbe5d..013acdfaf17e 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-19.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-19.js @@ -11,7 +11,8 @@ const URL = "test.js"; function setUpCode(debuggee) { - /* eslint-disable */ + /* eslint-disable mozilla/var-only-at-top-level, no-unused-vars */ + // prettier-ignore Cu.evalInSandbox( "" + function test() { // 1 var a = 1; // 2 @@ -22,7 +23,7 @@ function setUpCode(debuggee) { "1.8", URL ); - /* eslint-enable */ + /* eslint-enable mozilla/var-only-at-top-level, no-unused-vars */ } add_task( diff --git a/devtools/server/tests/xpcshell/test_breakpoint-21.js b/devtools/server/tests/xpcshell/test_breakpoint-21.js index 1055d727bc81..da7a87f91c0f 100644 --- a/devtools/server/tests/xpcshell/test_breakpoint-21.js +++ b/devtools/server/tests/xpcshell/test_breakpoint-21.js @@ -36,9 +36,10 @@ add_task( }) ); -/* eslint-disable */ function evalCode(debuggee) { // Start a new script + /* eslint-disable mozilla/var-only-at-top-level, max-nested-callbacks, no-unused-vars */ + // prettier-ignore Cu.evalInSandbox( "var line0 = Error().lineNumber;\n(" + function () { debugger; @@ -57,4 +58,5 @@ function evalCode(debuggee) { } + ")()", debuggee ); + /* eslint-enable mozilla/var-only-at-top-level, max-nested-callbacks, no-unused-vars */ } diff --git a/devtools/server/tests/xpcshell/test_ignore_caught_exceptions.js b/devtools/server/tests/xpcshell/test_ignore_caught_exceptions.js index f93551c6d440..fe04161aab61 100644 --- a/devtools/server/tests/xpcshell/test_ignore_caught_exceptions.js +++ b/devtools/server/tests/xpcshell/test_ignore_caught_exceptions.js @@ -35,7 +35,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore try { Cu.evalInSandbox(` // 1 debugger; // 2 @@ -50,5 +50,4 @@ function evaluateTestCode(debuggee) { 1 ); } catch (e) {} - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_ignore_no_interface_exceptions.js b/devtools/server/tests/xpcshell/test_ignore_no_interface_exceptions.js index 1627d712da82..50d28ffdc0f7 100644 --- a/devtools/server/tests/xpcshell/test_ignore_no_interface_exceptions.js +++ b/devtools/server/tests/xpcshell/test_ignore_no_interface_exceptions.js @@ -28,7 +28,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox(` // 1 function QueryInterface() { // 2 throw Cr.NS_ERROR_NO_INTERFACE; // 3 @@ -47,5 +47,4 @@ function evaluateTestCode(debuggee) { "test_ignore_no_interface_exceptions.js", 1 ); - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_pause_exceptions-01.js b/devtools/server/tests/xpcshell/test_pause_exceptions-01.js index 349655e07413..74bbae55c3e4 100644 --- a/devtools/server/tests/xpcshell/test_pause_exceptions-01.js +++ b/devtools/server/tests/xpcshell/test_pause_exceptions-01.js @@ -28,7 +28,8 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + /* eslint-disable no-throw-literal */ + // prettier-ignore debuggee.eval("(" + function () { function stopMe() { debugger; @@ -38,5 +39,5 @@ function evaluateTestCode(debuggee) { stopMe(); } catch (e) {} } + ")()"); - /* eslint-enable */ + /* eslint-enable no-throw-literal */ } diff --git a/devtools/server/tests/xpcshell/test_pause_exceptions-02.js b/devtools/server/tests/xpcshell/test_pause_exceptions-02.js index bc1ac59af6be..00631b071f2a 100644 --- a/devtools/server/tests/xpcshell/test_pause_exceptions-02.js +++ b/devtools/server/tests/xpcshell/test_pause_exceptions-02.js @@ -27,7 +27,8 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + /* eslint-disable no-throw-literal */ + // prettier-ignore debuggee.eval("(" + function () { // 1 function stopMe() { // 2 throw 42; // 3 @@ -36,5 +37,4 @@ function evaluateTestCode(debuggee) { stopMe(); // 6 } catch (e) {} // 7 } + ")()"); - /* eslint-enable */ } diff --git a/devtools/server/tests/xpcshell/test_pause_exceptions-03.js b/devtools/server/tests/xpcshell/test_pause_exceptions-03.js index 3b10d842c447..4fb13f4cf9db 100644 --- a/devtools/server/tests/xpcshell/test_pause_exceptions-03.js +++ b/devtools/server/tests/xpcshell/test_pause_exceptions-03.js @@ -35,7 +35,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( ` // 1 function stopMe() { // 2 @@ -50,5 +50,4 @@ function evaluateTestCode(debuggee) { "test_pause_exceptions-03.js", 1 ); - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_pause_exceptions-04.js b/devtools/server/tests/xpcshell/test_pause_exceptions-04.js index 86ca8bda6a3d..e61ac76d8088 100644 --- a/devtools/server/tests/xpcshell/test_pause_exceptions-04.js +++ b/devtools/server/tests/xpcshell/test_pause_exceptions-04.js @@ -76,7 +76,7 @@ add_task( async function evaluateTestCode(debuggee, throwValue) { await waitForTick(); try { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( ` // 1 function stopMeAgain() { // 2 @@ -89,6 +89,5 @@ async function evaluateTestCode(debuggee, throwValue) { "test_pause_exceptions-04.js", 1 ); - /* eslint-enable */ } catch (e) {} } diff --git a/devtools/server/tests/xpcshell/test_promise_state-01.js b/devtools/server/tests/xpcshell/test_promise_state-01.js index e1be77d521bf..d02b64a67e32 100644 --- a/devtools/server/tests/xpcshell/test_promise_state-01.js +++ b/devtools/server/tests/xpcshell/test_promise_state-01.js @@ -30,7 +30,8 @@ add_task( ); function evalCode(debuggee) { - /* eslint-disable */ + /* eslint-disable mozilla/var-only-at-top-level, no-unused-vars */ + // prettier-ignore Cu.evalInSandbox( "doTest();\n" + function doTest() { @@ -39,5 +40,5 @@ function evalCode(debuggee) { }, debuggee ); - /* eslint-enable */ + /* eslint-enable mozilla/var-only-at-top-level, no-unused-vars */ } diff --git a/devtools/server/tests/xpcshell/test_promise_state-02.js b/devtools/server/tests/xpcshell/test_promise_state-02.js index d99db7f2e50d..e1219f545cf8 100644 --- a/devtools/server/tests/xpcshell/test_promise_state-02.js +++ b/devtools/server/tests/xpcshell/test_promise_state-02.js @@ -42,7 +42,8 @@ add_task( ); function evalCode(debuggee) { - /* eslint-disable */ + /* eslint-disable mozilla/var-only-at-top-level, no-unused-vars */ + // prettier-ignore Cu.evalInSandbox( "doTest();\n" + function doTest() { @@ -54,5 +55,5 @@ function evalCode(debuggee) { }, debuggee ); - /* eslint-enable */ + /* eslint-enable mozilla/var-only-at-top-level, no-unused-vars */ } diff --git a/devtools/server/tests/xpcshell/test_promise_state-03.js b/devtools/server/tests/xpcshell/test_promise_state-03.js index 3b79877e5edd..8ec1fa371702 100644 --- a/devtools/server/tests/xpcshell/test_promise_state-03.js +++ b/devtools/server/tests/xpcshell/test_promise_state-03.js @@ -41,7 +41,8 @@ add_task( ); function evalCode(debuggee) { - /* eslint-disable */ + /* eslint-disable mozilla/var-only-at-top-level, no-unused-vars */ + // prettier-ignore Cu.evalInSandbox( "doTest();\n" + function doTest() { @@ -53,5 +54,5 @@ function evalCode(debuggee) { }, debuggee ); - /* eslint-enable */ + /* eslint-enable mozilla/var-only-at-top-level, no-unused-vars */ } diff --git a/devtools/server/tests/xpcshell/test_stepping-02.js b/devtools/server/tests/xpcshell/test_stepping-02.js index 1b7141a581c8..c9df67183961 100644 --- a/devtools/server/tests/xpcshell/test_stepping-02.js +++ b/devtools/server/tests/xpcshell/test_stepping-02.js @@ -43,7 +43,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( ` // 1 debugger; // 2 @@ -54,5 +54,4 @@ function evaluateTestCode(debuggee) { "test_stepping-01-test-code.js", 1 ); - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_stepping-03.js b/devtools/server/tests/xpcshell/test_stepping-03.js index 7184c476783d..88422ac0cc74 100644 --- a/devtools/server/tests/xpcshell/test_stepping-03.js +++ b/devtools/server/tests/xpcshell/test_stepping-03.js @@ -25,7 +25,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( ` // 1 function f() { // 2 @@ -40,5 +40,4 @@ function evaluateTestCode(debuggee) { "test_stepping-01-test-code.js", 1 ); - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_stepping-04.js b/devtools/server/tests/xpcshell/test_stepping-04.js index 81a14cedbddf..37a9f843d0b0 100644 --- a/devtools/server/tests/xpcshell/test_stepping-04.js +++ b/devtools/server/tests/xpcshell/test_stepping-04.js @@ -32,7 +32,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( ` // 1 function f() { // 2 @@ -47,5 +47,4 @@ function evaluateTestCode(debuggee) { "test_stepping-01-test-code.js", 1 ); - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_stepping-with-skip-breakpoints.js b/devtools/server/tests/xpcshell/test_stepping-with-skip-breakpoints.js index cf469de754a3..3ec4fd994df6 100644 --- a/devtools/server/tests/xpcshell/test_stepping-with-skip-breakpoints.js +++ b/devtools/server/tests/xpcshell/test_stepping-with-skip-breakpoints.js @@ -70,7 +70,7 @@ add_task( ); function evaluateTestCode(debuggee) { - /* eslint-disable */ + // prettier-ignore Cu.evalInSandbox( ` // 1 debugger; // 2 @@ -81,5 +81,4 @@ function evaluateTestCode(debuggee) { "test_stepping-01-test-code.js", 1 ); - /* eslint-disable */ } diff --git a/devtools/server/tests/xpcshell/test_symbols-01.js b/devtools/server/tests/xpcshell/test_symbols-01.js index 57f82956ec60..b23ddbc872b8 100644 --- a/devtools/server/tests/xpcshell/test_symbols-01.js +++ b/devtools/server/tests/xpcshell/test_symbols-01.js @@ -17,7 +17,8 @@ add_task( async function testSymbols(threadFront, debuggee) { const evalCode = () => { - /* eslint-disable */ + /* eslint-disable mozilla/var-only-at-top-level, no-unused-vars */ + // prettier-ignore Cu.evalInSandbox( "(" + function () { var symbolWithName = Symbol("Chris"); @@ -30,7 +31,7 @@ async function testSymbols(threadFront, debuggee) { URL, 1 ); - /* eslint-enable */ + /* eslint-enable mozilla/var-only-at-top-level, no-unused-vars */ }; const packet = await executeOnNextTickAndWaitForPause(evalCode, threadFront); diff --git a/devtools/server/tests/xpcshell/test_symbols-02.js b/devtools/server/tests/xpcshell/test_symbols-02.js index 2450cab717ca..12d4ef80c883 100644 --- a/devtools/server/tests/xpcshell/test_symbols-02.js +++ b/devtools/server/tests/xpcshell/test_symbols-02.js @@ -17,7 +17,8 @@ add_task( async function testSymbols(threadFront, debuggee) { const evalCode = () => { - /* eslint-disable */ + /* eslint-disable mozilla/var-only-at-top-level, no-extend-native, no-unused-vars */ + // prettier-ignore Cu.evalInSandbox( "(" + function () { Symbol.prototype.toString = () => { @@ -31,7 +32,7 @@ async function testSymbols(threadFront, debuggee) { URL, 1 ); - /* eslint-enable */ + /* eslint-enable mozilla/var-only-at-top-level, no-extend-native, no-unused-vars */ }; const packet = await executeOnNextTickAndWaitForPause(evalCode, threadFront); diff --git a/devtools/shared/heapsnapshot/tests/xpcshell/test_ReadHeapSnapshot_worker.js b/devtools/shared/heapsnapshot/tests/xpcshell/test_ReadHeapSnapshot_worker.js index d86b7aa4dbc6..0e8d8a8e8823 100644 --- a/devtools/shared/heapsnapshot/tests/xpcshell/test_ReadHeapSnapshot_worker.js +++ b/devtools/shared/heapsnapshot/tests/xpcshell/test_ReadHeapSnapshot_worker.js @@ -1,9 +1,10 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test that we can read core dumps into HeapSnapshot instances in a worker. -// eslint-disable-next-line -add_task(async function () { +add_task(async function() { const worker = new ChromeWorker("resource://test/heap-snapshot-worker.js"); worker.postMessage({}); diff --git a/devtools/shared/heapsnapshot/tests/xpcshell/test_getCensusIndividuals_01.js b/devtools/shared/heapsnapshot/tests/xpcshell/test_getCensusIndividuals_01.js index 4f6cfedaa909..6963f3f33af5 100644 --- a/devtools/shared/heapsnapshot/tests/xpcshell/test_getCensusIndividuals_01.js +++ b/devtools/shared/heapsnapshot/tests/xpcshell/test_getCensusIndividuals_01.js @@ -25,8 +25,8 @@ function run_test() { CensusUtils.countToBucketBreakdown(BREAKDOWN) ); - /* eslint-disable */ // DFS Index + // prettier-ignore return new Map([ // 0 [stack1, { // 1 JSObject: [101, 102, 103], // 2 @@ -45,7 +45,6 @@ function run_test() { JSString: [411, 412, 413], // 12 }], ]); - /* eslint-enable */ }, }; diff --git a/tools/rewriting/ThirdPartyPaths.txt b/tools/rewriting/ThirdPartyPaths.txt index 971ef2c1015a..4987419b4673 100644 --- a/tools/rewriting/ThirdPartyPaths.txt +++ b/tools/rewriting/ThirdPartyPaths.txt @@ -12,6 +12,7 @@ devtools/client/shared/sourceeditor/codemirror/ devtools/client/shared/sourceeditor/test/cm_mode_ruby.js devtools/client/shared/sourceeditor/test/codemirror/ devtools/client/shared/vendor/ +devtools/client/inspector/markup/test/helper_diff.js devtools/shared/acorn/ devtools/shared/heapsnapshot/CoreDump.pb.cc devtools/shared/heapsnapshot/CoreDump.pb.h