testing/eslint-plugin-mozilla/docs/components-imports.rst
author Michael Ratcliffe <mratcliffe@mozilla.com>
Wed, 30 Sep 2015 14:44:48 +0100
changeset 298688 4fd815c46a675085b7bb23fdd1cd91bf875cda19
child 302101 397c69fa1677017b7f1ad532958b8a8ea70a2313
permissions -rw-r--r--
Bug 1203520 - We need a DevTools ESLint plugin containing our ruleset r=gps

.. _components-imports:

==================
components-imports
==================

Rule Details
------------

Adds the filename of imported files e.g.
``Cu.import("some/path/Blah.jsm")`` adds Blah to the global scope.

The following patterns are supported:

-  ``Cu.import("resource:///modules/devtools/ViewHelpers.jsm");``
-  ``loader.lazyImporter(this, "name1");``
-  ``loader.lazyRequireGetter(this, "name2"``
-  ``loader.lazyServiceGetter(this, "name3"``
-  ``XPCOMUtils.defineLazyModuleGetter(this, "setNamedTimeout", ...)``
-  ``loader.lazyGetter(this, "toolboxStrings"``
-  ``XPCOMUtils.defineLazyGetter(this, "clipboardHelper"``