Bug 1700106 - [devtools] Remove now-useless eslint files related to mochitests. r=jdescottes,Standard8

I kept a few having some overrides. But they may be irrelevant.
And I kept some eslint files for all folder that aren't matching the pattern matching "**/test*/**/browser*/".
Ideally we would rename these folder to match.

Last but not least, I identified one case where we were using mochitest file for xpcshell tests!

Differential Revision: https://phabricator.services.mozilla.com/D109481
This commit is contained in:
Alexandre Poirot 2021-03-23 15:51:18 +00:00
parent 349e77181c
commit ded026f627
58 changed files with 85 additions and 257 deletions

View file

@ -127,20 +127,17 @@ module.exports = {
{
...browserTestConfig,
files: browserTestPaths.map(path => `${path}**`),
excludedFiles: "devtools/**",
},
{
...removeOverrides(mochitestTestConfig),
files: mochitestTestPaths.map(path => `${path}**`),
excludedFiles: [
"devtools/**",
"security/manager/ssl/tests/mochitest/browser/**",
],
},
{
...removeOverrides(chromeTestConfig),
files: chromeTestPaths.map(path => `${path}**`),
excludedFiles: ["devtools/**"],
},
{
env: {

View file

@ -1,10 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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"],
};

View file

@ -1,10 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,10 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,8 +1,7 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
rules: {
"no-unused-vars": ["error", { vars: "local", args: "none" }],
},

View file

@ -1,9 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
rules: {
"no-unused-vars": ["error", { vars: "local", args: "none" }],
},
};

View file

@ -1,10 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,12 +1,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
env: {
jest: true,
},

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
};

View file

@ -1,9 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../../.eslintrc.mochitests.js",
};

View file

@ -6,15 +6,5 @@
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../../.eslintrc.mochitests.js",
globals: {
run_test: true,
run_next_test: true,
equal: true,
do_print: true,
},
rules: {
// Stop giving errors for run_test
camelcase: "off",
},
extends: "../../../../../.eslintrc.xpcshell.js",
};

View file

@ -14,11 +14,6 @@ const { task } = require("devtools/client/shared/redux/middleware/task");
* Tests that task middleware allows dispatching generators, promises and objects
* that return actions;
*/
function run_test() {
run_next_test();
}
add_task(async function() {
const store = applyMiddleware(task)(createStore)(reducer);

View file

@ -15,10 +15,6 @@ const {
} = require("devtools/client/shared/vendor/redux");
const { task } = require("devtools/client/shared/redux/middleware/task");
function run_test() {
run_next_test();
}
add_task(async function() {
const store = applyMiddleware(task)(createStore)(reducer);

View file

@ -17,10 +17,6 @@ const {
* Tests that the middleware handles errors thrown in tasks, and rejected promises.
*/
function run_test() {
run_next_test();
}
add_task(async function() {
const store = applyMiddleware(task)(createStore)(reducer);

View file

@ -1,10 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
globals: {
runCodeMirrorTest: true,
gBrowser: true,
},
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,8 +1,6 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
overrides: [
{
files: ["test-dynamic-import.js", "test-error-worklet.js"],

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the common devtools mochitest eslintrc config.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the common devtools mochitest eslintrc config.
extends: "../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the common devtools mochitest eslintrc config.
extends: "../../../.eslintrc.mochitests.js",
};

View file

@ -69,5 +69,7 @@ function handle_echo({ data }) {
);
// Finish the mochitest.
// This function is set and defined by test_suspendTimeouts.js
// eslint-disable-next-line no-undef
finish();
}

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,10 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
globals: {
ChromeUtils: true,
sendAsyncMessage: true,
},
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -4,7 +4,8 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../../.eslintrc.mochitests.js",
};

View file

@ -1,6 +1,7 @@
"use strict";
// General rule from /.eslintrc.js only accept folders matching **/test*/browser*/
// where is this folder doesn't match, so manually apply browser test config
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
extends: ["plugin:mozilla/browser-test"],
};

View file

@ -1,6 +0,0 @@
"use strict";
module.exports = {
// Extend from the shared list of defined globals for mochitests.
extends: "../../../.eslintrc.mochitests.js",
};