diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/reject-mixing-eager-and-lazy.rst | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/reject-mixing-eager-and-lazy.rst')
-rw-r--r-- | docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/reject-mixing-eager-and-lazy.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/reject-mixing-eager-and-lazy.rst b/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/reject-mixing-eager-and-lazy.rst index 51524f4e14..1b7c165036 100644 --- a/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/reject-mixing-eager-and-lazy.rst +++ b/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/reject-mixing-eager-and-lazy.rst @@ -9,9 +9,10 @@ Examples of incorrect code for this rule: .. code-block:: js - const { SomeProp } = ChromeUtils.import("resource://gre/modules/Foo.jsm"); - ChromeUtils.defineLazyModuleGetters(lazy, { - OtherProp: "resource://gre/modules/Foo.jsm", + const { SomeProp } = + ChromeUtils.importESModule("resource://gre/modules/Foo.sys.mjs"); + ChromeUtils.defineESModuleGetters(lazy, { + OtherProp: "resource://gre/modules/Foo.sys.mjs", }); Examples of correct code for this rule: @@ -19,4 +20,6 @@ Examples of correct code for this rule: .. code-block:: js - const { SomeProp, OtherProp } = ChromeUtils.import("resource://gre/modules/Foo.jsm"); + const { SomeProp, OtherProp } = ChromeUtils.importESModule( + "resource://gre/modules/Foo.sys.mjs" + ); |