summaryrefslogtreecommitdiffstats
path: root/docs/code-quality/lint/linters/eslint-plugin-mozilla/valid-ci-uses.rst
blob: 440d730e052bc1a182b3a82b6af33ffdd287a3ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
valid-ci-uses
=============

Ensures that interface accesses on ``Ci`` are valid, and property accesses on
``Ci.<interface>`` are also valid.

This rule requires a full build to run, and is not turned on by default. To run
this rule manually, use:

.. code-block:: console

    MOZ_OBJDIR=objdir-ff-opt ./mach eslint --rule="mozilla/valid-ci-uses: error" *

Examples of incorrect code for this rule:
-----------------------------------------

``nsIFoo`` does not exist.

.. code-block:: js

    Ci.nsIFoo

``UNKNOWN_CONSTANT`` does not exist on nsIURIFixup.

.. code-block:: js

    Ci.nsIURIFixup.UNKNOWN_CONSTANT

Examples of correct code for this rule:
---------------------------------------

``nsIFile`` does exist.

.. code-block:: js

    Ci.nsIFile

``FIXUP_FLAG_NONE`` does exist on nsIURIFixup.

.. code-block:: js

    Ci.nsIURIFixup.FIXUP_FLAG_NONE