valid-services.rst (623B)
1 valid-services 2 ============== 3 4 Ensures that accesses of the ``Services`` object are valid. 5 ``Services`` are defined in ``tools/lint/eslint/eslint-plugin-mozilla/lib/services.json`` and can be added by copying from 6 ``<objdir>/xpcom/components/services.json`` after a build. 7 8 Examples of incorrect code for this rule: 9 ----------------------------------------- 10 11 Assuming ``foo`` is not defined within Services. 12 13 .. code-block:: js 14 15 Services.foo.fn(); 16 17 Examples of correct code for this rule: 18 --------------------------------------- 19 20 Assuming ``bar`` is defined within Services. 21 22 .. code-block:: js 23 24 Services.bar.fn();