From 2c56de98ff83d214b58143788b1088766fff8db7 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Fri, 24 Jul 2020 20:39:07 +0000 Subject: [PATCH] Bug 1620537 - Fix eslint issues in devtools .eslintrc*.js files now that ESLint 7 will lint them. r=mossop Depends on D84815 Differential Revision: https://phabricator.services.mozilla.com/D84816 --- devtools/.eslintrc.mochitests.js | 34 +++++++++---------- devtools/.eslintrc.xpcshell.js | 12 +++---- .../webconsole/test/node/.eslintrc.mocha.js | 16 ++++----- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/devtools/.eslintrc.mochitests.js b/devtools/.eslintrc.mochitests.js index 2a0ce303b495..0e3b4c8ee4f5 100644 --- a/devtools/.eslintrc.mochitests.js +++ b/devtools/.eslintrc.mochitests.js @@ -2,31 +2,31 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +"use strict"; + // Parent config file for all devtools browser mochitest files. module.exports = { - "extends": [ - "plugin:mozilla/browser-test" - ], + extends: ["plugin:mozilla/browser-test"], // All globals made available in the test environment. - "globals": { - "DevToolsUtils": true, - "gDevTools": true, - "once": true, - "synthesizeKeyFromKeyTag": true, - "TargetFactory": true, - "waitForTick": true, - "waitUntilState": true, + globals: { + DevToolsUtils: true, + gDevTools: true, + once: true, + synthesizeKeyFromKeyTag: true, + TargetFactory: true, + waitForTick: true, + waitUntilState: true, }, - "parserOptions": { - "ecmaFeatures": { - "jsx": true, - } + parserOptions: { + ecmaFeatures: { + jsx: true, + }, }, - "rules": { + rules: { // Allow non-camelcase so that run_test doesn't produce a warning. - "camelcase": "off", + camelcase: "off", // Tests don't have to cleanup observers "mozilla/balanced-observers": 0, // Tests can always import anything. diff --git a/devtools/.eslintrc.xpcshell.js b/devtools/.eslintrc.xpcshell.js index 0eea96b8690c..68b3a9aa8320 100644 --- a/devtools/.eslintrc.xpcshell.js +++ b/devtools/.eslintrc.xpcshell.js @@ -2,18 +2,18 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +"use strict"; + // Parent config file for all devtools xpcshell files. module.exports = { - "extends": [ - "plugin:mozilla/xpcshell-test" - ], - "rules": { + extends: ["plugin:mozilla/xpcshell-test"], + rules: { // Allow non-camelcase so that run_test doesn't produce a warning. - "camelcase": "off", + camelcase: "off", "block-scoped-var": "off", // Tests don't have to cleanup observers "mozilla/balanced-observers": 0, // Tests can always import anything. "mozilla/reject-some-requires": "off", - } + }, }; diff --git a/devtools/client/webconsole/test/node/.eslintrc.mocha.js b/devtools/client/webconsole/test/node/.eslintrc.mocha.js index 1919982b5b2b..c2dbe118c50a 100644 --- a/devtools/client/webconsole/test/node/.eslintrc.mocha.js +++ b/devtools/client/webconsole/test/node/.eslintrc.mocha.js @@ -1,14 +1,14 @@ "use strict"; module.exports = { - "env": { - "browser": false, - "mocha": true, + env: { + browser: false, + mocha: true, }, - "globals": { + globals: { // document and window are injected via jsdom-global. - "document": false, - "window": false, - } -} + document: false, + window: false, + }, +};