diff options
Diffstat (limited to '')
-rw-r--r-- | docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-console-createInstance.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-console-createInstance.rst b/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-console-createInstance.rst new file mode 100644 index 0000000000..b505cfd8fb --- /dev/null +++ b/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/use-console-createInstance.rst @@ -0,0 +1,20 @@ +use-console-createInstance +========================== + +Rejects usage of Console.sys.mjs or Log.sys.mjs, preferring use of +``console.createInstance`` instead. See `Javascript Logging </toolkit/javascript-logging.html>`__ for more information. + +Examples of incorrect code for this rule: +----------------------------------------- + +.. code-block:: js + + "resource://gre/modules/Console.sys.mjs" + "resource://gre/modules/Log.sys.mjs" + +Examples of correct code for this rule: +--------------------------------------- + +.. code-block:: js + + console.createInstance({ prefix: "Foo" }); |