valid-ci-uses.rst (1192B)
1 valid-ci-uses 2 ============= 3 4 Ensures that interface accesses on ``Ci`` are valid, and property accesses on 5 ``Ci.<interface>`` are also valid. 6 7 This rule requires a full build to run, and is not turned on by default. To run 8 this rule manually, use: 9 10 .. code-block:: console 11 12 MOZ_OBJDIR=objdir-ff-opt ./mach eslint --rule="mozilla/valid-ci-uses: error" * 13 14 .. note:: 15 Note that for platform-specific interfaces, you need to manually add the 16 interface in question to 17 :searchfox:`the rule <tools/lint/eslint/eslint-plugin-mozilla/lib/rules/valid-ci-uses.mjs>` 18 (as a build on any given platform cannot find out about interfaces that are 19 not available on that platform). 20 21 22 Examples of incorrect code for this rule: 23 ----------------------------------------- 24 25 ``nsIFoo`` does not exist. 26 27 .. code-block:: js 28 29 Ci.nsIFoo 30 31 ``UNKNOWN_CONSTANT`` does not exist on nsIURIFixup. 32 33 .. code-block:: js 34 35 Ci.nsIURIFixup.UNKNOWN_CONSTANT 36 37 Examples of correct code for this rule: 38 --------------------------------------- 39 40 ``nsIFile`` does exist. 41 42 .. code-block:: js 43 44 Ci.nsIFile 45 46 ``FIXUP_FLAG_NONE`` does exist on nsIURIFixup. 47 48 .. code-block:: js 49 50 Ci.nsIURIFixup.FIXUP_FLAG_NONE