.eslintrc.mjs (2005B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 import config from "../../../../toolkit/components/extensions/parent/.eslintrc.mjs"; 6 7 export default [ 8 ...config, 9 { 10 languageOptions: { 11 globals: { 12 // These are defined in browser/components/extensions/parent/ext-browser.js 13 Tab: true, 14 TabContext: true, 15 Window: true, 16 clickModifiersFromEvent: true, 17 getExtTabGroupIdForInternalTabGroupId: true, 18 getInternalTabGroupIdForExtTabGroupId: true, 19 makeWidgetId: true, 20 openOptionsPage: true, 21 replaceUrlInTab: true, 22 tabTracker: true, 23 waitForTabLoaded: true, 24 windowTracker: true, 25 26 // NOTE: Unlike ext-browser.js (and ext-toolkit.js, ext-tabs-base.js), the 27 // files mentioned below are not loaded unconditionally. In practice, 28 // because all ext-*.js files share the same global scope, they are likely 29 // available when a dependent API is available. Before using these globals, 30 // make sure that the dependent module (API) has been loaded, e.g. by only 31 // using these globals when you know that an extension is using one of these 32 // APIs. 33 34 // This is defined in browser/components/extensions/parent/ext-browserAction.js 35 browserActionFor: true, 36 // This is defined in browser/components/extensions/parent/ext-menus.js 37 actionContextMenu: true, 38 // This is defined in browser/components/extensions/parent/ext-devtools.js 39 getTargetTabIdForToolbox: true, 40 getToolboxEvalOptions: true, 41 // This is defined in browser/components/extensions/parent/ext-pageAction.js 42 pageActionFor: true, 43 // This is defined in browser/components/extensions/parent/ext-sidebarAction.js 44 sidebarActionFor: true, 45 }, 46 }, 47 }, 48 ];