summaryrefslogtreecommitdiffstats
path: root/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/no-define-cc-etc.rst
blob: 4421f4dd54cd07c4ab535f50818c748e61a7f1d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
no-define-cc-etc
================

Disallows old-style definitions for ``Cc``/``Ci``/``Cu``/``Cr``. These are now
defined globally for all chrome contexts.

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

.. code-block:: js

    var Cc = Components.classes;
    var Ci = Components.interfaces;
    var {Ci: interfaces, Cc: classes, Cu: utils} = Components;
    var Cr = Components.results;


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

.. code-block:: js

    const CC = Components.Constructor;