Bug 1936051 - Part 5: Remove the reject-global-this rule. r=Standard8,frontend-codestyle-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D233731
This commit is contained in:
Tooru Fujisawa
2025-01-23 12:09:33 +00:00
parent 7ea13bcadf
commit 2b05a3b05e
6 changed files with 0 additions and 126 deletions

View File

@@ -1,29 +0,0 @@
reject-global-this
======================
Rejects global ``this`` usage in JSM files. The global ``this`` is not
available in ESM, and this is a preparation for the migration.
Examples of incorrect code for this rule:
-----------------------------------------
.. code-block:: js
this.EXPORTED_SYMBOLS = ["foo"];
XPCOMUtils.defineLazyModuleGetters(this, {
AddonManager: "resource://gre/modules/AddonManager.jsm",
});
Examples of correct code for this rule:
---------------------------------------
.. code-block:: js
const EXPORTED_SYMBOLS = ["foo"];
const lazy = {};
XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonManager: "resource://gre/modules/AddonManager.jsm",
});