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:
@@ -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",
|
||||
});
|
||||
Reference in New Issue
Block a user