mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Bug 1885041 - Expand disallowing JSM based imports via ESLint to everything except for devtools. r=arai,omc-reviewers,aminomancer,zombie
Differential Revision: https://phabricator.services.mozilla.com/D204441
This commit is contained in:
parent
dd30d8567c
commit
f4ce4f5c95
@ -2202,17 +2202,22 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["*.html", "*.xhtml", "*.xml"],
|
||||
files: ["**"],
|
||||
excludedFiles: [
|
||||
// Devtools code, see bug 1525652.
|
||||
"devtools/**",
|
||||
// Tests specific to JSM
|
||||
"dom/encoding/test/test_stringencoding.xhtml",
|
||||
"dom/url/tests/test_bug883784.xhtml",
|
||||
"dom/url/tests/test_url.xhtml",
|
||||
"dom/url/tests/test_worker_url.xhtml",
|
||||
"dom/workers/test/test_chromeWorkerJSM.xhtml",
|
||||
"js/xpconnect/tests/browser/browser_import_mapped_jsm.js",
|
||||
"js/xpconnect/tests/chrome/test_chrometoSource.xhtml",
|
||||
"js/xpconnect/tests/chrome/test_expandosharing.xhtml",
|
||||
"js/xpconnect/tests/chrome/test_xrayic.xhtml",
|
||||
// Code that can't be cleaned until we're ready to remove the old loader.
|
||||
"js/xpconnect/loader/XPCOMUtils.sys.mjs",
|
||||
],
|
||||
rules: {
|
||||
"mozilla/reject-chromeutils-import": "error",
|
||||
|
@ -11,9 +11,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
"resource:///modules/asrouter/FeatureCalloutMessages.sys.mjs",
|
||||
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
});
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
QueryCache: "resource:///modules/asrouter/ASRouterTargeting.jsm",
|
||||
QueryCache: "resource:///modules/asrouter/ASRouterTargeting.sys.mjs",
|
||||
});
|
||||
const { FxAccounts } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/FxAccounts.sys.mjs"
|
||||
|
@ -2,10 +2,8 @@
|
||||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PromptTestUtils",
|
||||
"resource://testing-common/PromptTestUtils.jsm"
|
||||
const { PromptTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/PromptTestUtils.sys.mjs"
|
||||
);
|
||||
|
||||
async function waitForExtensionModalPrompt(extension) {
|
||||
|
@ -23,7 +23,9 @@ const {
|
||||
BOOKMARKS_RESTORE_SUCCESS_EVENT,
|
||||
BOOKMARKS_RESTORE_FAILED_EVENT,
|
||||
SECTION_ID,
|
||||
} = ChromeUtils.import("resource://activity-stream/lib/HighlightsFeed.jsm");
|
||||
} = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/lib/HighlightsFeed.sys.mjs"
|
||||
);
|
||||
|
||||
const FAKE_LINKS = new Array(20)
|
||||
.fill(null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user