Skip to content

Commit

Permalink
Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directi…
Browse files Browse the repository at this point in the history
…ve is not necessary for modules. r=arai,pip-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D158115
  • Loading branch information
Standard8 committed Sep 26, 2022
1 parent eb54efc commit a9ba6e8
Show file tree
Hide file tree
Showing 119 changed files with 10 additions and 219 deletions.
1 change: 0 additions & 1 deletion browser/actors/AboutNewTabChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

Expand Down
2 changes: 0 additions & 2 deletions browser/actors/AboutNewTabParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/actors/AboutPluginsParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 lazy = {};

ChromeUtils.defineModuleGetter(
Expand Down
1 change: 0 additions & 1 deletion browser/actors/AboutReaderChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* 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";

const lazy = {};

Expand Down
2 changes: 0 additions & 2 deletions browser/actors/AboutReaderParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* 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 lazy = {};

ChromeUtils.defineESModuleGetters(lazy, {
Expand Down
2 changes: 0 additions & 2 deletions browser/actors/AboutTabCrashedParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/actors/BrowserProcessChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 lazy = {};

ChromeUtils.defineModuleGetter(
Expand Down
1 change: 0 additions & 1 deletion browser/actors/BrowserTabChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* 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";

const lazy = {};

Expand Down
1 change: 0 additions & 1 deletion browser/actors/BrowserTabParent.sys.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* 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";

const { BrowserWindowTracker } = ChromeUtils.import(
"resource:///modules/BrowserWindowTracker.jsm"
Expand Down
1 change: 0 additions & 1 deletion browser/actors/ContentSearchChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* 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";

export class ContentSearchChild extends JSWindowActorChild {
handleEvent(event) {
Expand Down
1 change: 0 additions & 1 deletion browser/actors/ContentSearchParent.sys.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

Expand Down
1 change: 0 additions & 1 deletion browser/actors/FormValidationChild.sys.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* 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";

/**
* Handles the validation callback from nsIFormFillController and
Expand Down
2 changes: 0 additions & 2 deletions browser/actors/FormValidationParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Chrome side handling of form validation popup.
*/

"use strict";

const lazy = {};

ChromeUtils.defineModuleGetter(
Expand Down
2 changes: 0 additions & 2 deletions browser/actors/ScreenshotsComponentChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-env mozilla/browser-window */

"use strict";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/enterprisepolicies/Policies.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const { AppConstants } = ChromeUtils.import(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

/*
* A Bookmark object received through the policy engine will be an
* object with the following properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const PREF_LOGLEVEL = "browser.policies.loglevel";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

/*
* This module implements the policy to block websites from being visited,
* or to only allow certain websites to be visited.
Expand Down
2 changes: 0 additions & 2 deletions browser/components/firefoxview/colorways-card.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 { BuiltInThemes } = ChromeUtils.import(
"resource:///modules/BuiltInThemes.jsm"
);
Expand Down
2 changes: 0 additions & 2 deletions browser/components/firefoxview/featureCallout.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

/**
* This module exports the FirefoxViewNotificationManager singleton, which manages the notification state
* for the Firefox View button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

/**
* This module exports the TabsSetupFlowManager singleton, which manages the state and
* diverse inputs which drive the Firefox View synced tabs setup flow
Expand Down
2 changes: 0 additions & 2 deletions browser/components/firefoxview/firefoxview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

window.addEventListener("DOMContentLoaded", () => {
Services.telemetry.setEventRecordingEnabled("firefoxview", true);
Services.telemetry.recordEvent("firefoxview", "entered", "firefoxview", null);
Expand Down
2 changes: 0 additions & 2 deletions browser/components/firefoxview/recently-closed-tabs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
Expand Down
2 changes: 0 additions & 2 deletions browser/components/firefoxview/tab-pickup-list.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
Expand Down
2 changes: 0 additions & 2 deletions browser/components/pagedata/OpenGraphPageData.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

/**
* Collects Open Graph (https://opengraphprotocol.org/) related data from a page.
*/
Expand Down
2 changes: 0 additions & 2 deletions browser/components/pagedata/PageDataChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/pagedata/PageDataParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/pagedata/PageDataSchema.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/pagedata/PageDataService.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const { EventEmitter } = ChromeUtils.import(
Expand Down
2 changes: 0 additions & 2 deletions browser/components/pagedata/SchemaOrgPageData.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { PageDataSchema } from "resource:///modules/pagedata/PageDataSchema.sys.mjs";

/**
Expand Down
2 changes: 0 additions & 2 deletions browser/components/pagedata/TwitterPageData.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

/**
* Collects Twitter card (https://developer.twitter.com/en/docs/twitter-for-websites/)
* related data from a page.
Expand Down
2 changes: 0 additions & 2 deletions browser/components/places/CommonNames.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
Expand Down
2 changes: 0 additions & 2 deletions browser/components/places/Interactions.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/places/InteractionsBlocklist.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/places/InteractionsChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 lazy = {};

ChromeUtils.defineModuleGetter(
Expand Down
2 changes: 0 additions & 2 deletions browser/components/places/InteractionsParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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 lazy = {};

ChromeUtils.defineESModuleGetters(lazy, {
Expand Down
2 changes: 0 additions & 2 deletions browser/components/places/SnapshotGroups.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/places/Snapshots.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/screenshots/ScreenshotsUtils.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/search/BrowserSearchTelemetry.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/search/SearchOneOffs.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/search/SearchSERPTelemetry.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/search/SearchUIUtils.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Various utilities for search related UI.
*/

"use strict";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
2 changes: 0 additions & 2 deletions browser/components/urlbar/QuickActionsLoaderDefault.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* 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";

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

const lazy = {};
Expand Down
Loading

0 comments on commit a9ba6e8

Please sign in to comment.