Mozilla ESLint Plugin¶
This is the documentation of Mozilla ESLint PLugin.
Environments¶
The plugin implements the following environments:
Rules¶
The plugin implements the following rules:
- avoid-Date-timing
- avoid-removeChild
- balanced-listeners
- consistent-if-bracing
- import-browser-window-globals
- import-content-task-globals
- import-globals
- import-globals-from
- import-headjs-globals
- mark-test-function-used
- no-aArgs
- no-compare-against-boolean-literals
- no-define-cc-etc
- no-throw-cr-literal
- no-useless-parameters
- no-useless-removeEventListener
- no-useless-run-test
- reject-addtask-only
- reject-chromeutils-import-params
- reject-importGlobalProperties
- reject-osfile
- reject-scriptableunicodeconverter
- reject-some-requires
- use-cc-etc
- use-chromeutils-import
- use-default-preference-values
- use-includes-instead-of-indexOf
- use-ownerGlobal
- use-returnValue
- use-services
- var-only-at-top-level
Tests¶
The tests for eslint-plugin-mozilla are run via mochajs on top of node. Most of the tests use the ESLint Rule Unit Test framework.
Running Tests¶
The tests for eslint-plugin-mozilla are run via mochajs on top of node. Most of the tests use the ESLint Rule Unit Test framework.
The rules have some self tests, these can be run via:
$ cd tools/lint/eslint/eslint-plugin-mozilla
$ npm install
$ npm run test
Disabling tests¶
In the unlikely event of needing to disable a test, currently the only way is by commenting-out. Please file a bug if you have to do this. Bugs should be filed in the Testing product under Lint.