diff options
Diffstat (limited to '')
-rw-r--r-- | docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-chromeutils-definelazygetter.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-chromeutils-definelazygetter.rst b/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-chromeutils-definelazygetter.rst new file mode 100644 index 0000000000..61d13f4e63 --- /dev/null +++ b/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-chromeutils-definelazygetter.rst @@ -0,0 +1,22 @@ +use-chromeutils-definelazygetter +================================ + +Require use of ``ChromeUtils.defineLazyGetter`` rather than ``XPCOMUtils.defineLazyGetter``. + +Examples of incorrect code for this rule: +----------------------------------------- + +.. code-block:: js + + XPCOMUtils.defineLazyGetter(lazy, "textEncoder", function () { + return new TextEncoder(); + }); + +Examples of correct code for this rule: +--------------------------------------- + +.. code-block:: js + + ChromeUtils.defineLazyGetter(lazy, "textEncoder", function () { + return new TextEncoder(); + }); |