forked from mirrors/gecko-dev
Bug 1755907 - [devtools] Enable eslint on debugger tests (except their test pages). r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D139366
This commit is contained in:
parent
681e4456ef
commit
4f6825b177
11 changed files with 35 additions and 17 deletions
|
|
@ -58,11 +58,14 @@ browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm
|
|||
# Ignore devtools debugger files which aren't intended for linting, and also
|
||||
# aren't included in any .eslintignore or .prettierignore file.
|
||||
# See https://github.com/firefox-devtools/debugger/blob/master/package.json#L24
|
||||
devtools/client/debugger/bin/
|
||||
devtools/client/debugger/configs/
|
||||
devtools/client/debugger/dist/
|
||||
devtools/client/debugger/images/
|
||||
devtools/client/debugger/test/
|
||||
devtools/client/debugger/packages/
|
||||
devtools/client/debugger/test/mochitest/examples/
|
||||
devtools/client/debugger/index.html
|
||||
devtools/client/debugger/webpack.config.js
|
||||
|
||||
# Ignore devtools preferences files
|
||||
devtools/client/preferences/
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ const ignorePatterns = [
|
|||
.split("\n"),
|
||||
...fs
|
||||
.readFileSync(
|
||||
path.join(__dirname, "devtools", "client", "debugger", ".eslintignore")
|
||||
path.join(__dirname, "devtools", "client", "debugger", "src", ".eslintignore")
|
||||
)
|
||||
.toString("utf-8")
|
||||
.split("\n")
|
||||
.filter(p => p && !p.startsWith("#"))
|
||||
.map(p => `devtools/client/debugger/${p}`),
|
||||
.map(p => `devtools/client/debugger/src/${p}`),
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ module.exports = {
|
|||
"client/shared/*.jsm",
|
||||
"client/shared/widgets/*.jsm",
|
||||
"client/storage/VariablesView.jsm",
|
||||
"client/debugger/test/**",
|
||||
],
|
||||
rules: {
|
||||
"consistent-return": "off",
|
||||
|
|
@ -77,7 +78,7 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
{
|
||||
files: ["client/framework/**"],
|
||||
files: ["client/framework/**", "client/debugger/test/**"],
|
||||
rules: {
|
||||
strict: "off",
|
||||
},
|
||||
|
|
@ -135,7 +136,7 @@ module.exports = {
|
|||
excludedFiles: [
|
||||
// Debugger modules have a custom bundling logic which relies on relative
|
||||
// paths.
|
||||
"client/debugger/**",
|
||||
"client/debugger/src/**",
|
||||
// `client/shared/build` contains node helpers to build the debugger and
|
||||
// not devtools modules.
|
||||
"client/shared/build/**",
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
assets/*
|
||||
src/test/examples/**
|
||||
src/test/integration/**
|
||||
src/test/unit-sources/**
|
||||
src/**/fixtures/**
|
||||
src/test/mochitest/**
|
||||
bin/
|
||||
packages/**/fixtures/**
|
||||
node_modules
|
||||
out
|
||||
|
|
@ -2,6 +2,10 @@
|
|||
* 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";
|
||||
|
||||
/* global __dirname */
|
||||
|
||||
/**
|
||||
* NOTE: This file does not apply to builds in MC. This config is used for
|
||||
* our Jest tests and for webpack bundle builds.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
* 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";
|
||||
|
||||
/* global __dirname */
|
||||
|
||||
const sharedJestConfig = require(`${__dirname}/../shared/test-helpers/shared-jest.config`);
|
||||
|
||||
const { resolve } = require("path");
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
* 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";
|
||||
|
||||
/* global __dirname */
|
||||
|
||||
const { resolve } = require("path");
|
||||
const rootDir = resolve(__dirname);
|
||||
module.exports = {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
* 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";
|
||||
|
||||
const { MultiLocalizationHelper } = require("devtools/shared/l10n");
|
||||
const {
|
||||
FluentL10n,
|
||||
|
|
@ -158,7 +160,7 @@ class DebuggerPanel {
|
|||
|
||||
unHighlightDomElement() {
|
||||
if (!this._unhighlight) {
|
||||
return;
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return this._unhighlight();
|
||||
|
|
|
|||
5
devtools/client/debugger/src/.eslintignore
Normal file
5
devtools/client/debugger/src/.eslintignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
test/examples/**
|
||||
test/integration/**
|
||||
test/unit-sources/**
|
||||
**/fixtures/**
|
||||
test/mochitest/**
|
||||
|
|
@ -8,7 +8,12 @@
|
|||
*/
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* import-globals-from ./head.js */
|
||||
|
||||
// We can't use "import globals from head.js" because of bug 1395426.
|
||||
// So workaround by manually importing the few symbols we are using from it.
|
||||
// (Note that only ./mach eslint devtools/client fails while devtools/client/debugger passes)
|
||||
/* global EXAMPLE_URL, ContentTask */
|
||||
|
||||
// Assume that shared-head is always imported before this file
|
||||
/* import-globals-from ../../../shared/test/shared-head.js */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue