1
0
Fork 0
firefox/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/valid-services.rst
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

24 lines
623 B
ReStructuredText

valid-services
==============
Ensures that accesses of the ``Services`` object are valid.
``Services`` are defined in ``tools/lint/eslint/eslint-plugin-mozilla/lib/services.json`` and can be added by copying from
``<objdir>/xpcom/components/services.json`` after a build.
Examples of incorrect code for this rule:
-----------------------------------------
Assuming ``foo`` is not defined within Services.
.. code-block:: js
Services.foo.fn();
Examples of correct code for this rule:
---------------------------------------
Assuming ``bar`` is defined within Services.
.. code-block:: js
Services.bar.fn();