tenfourfox/testing/eslint-plugin-mozilla/docs/components-imports.rst
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

22 lines
650 B
ReStructuredText

.. _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://devtools/client/shared/widgets/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"``