gecko-dev/tools/lint/eslint/eslint-plugin-mozilla
2019-02-28 08:39:33 +00:00
..
lib Bug 1528751 - Add a custom eslint rule to check "consistent" if bracing. r=Standard8 2019-02-28 08:39:33 +00:00
reporters
scripts Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
tests Bug 1528751 - Add a custom eslint rule to check "consistent" if bracing. r=Standard8 2019-02-28 08:39:33 +00:00
.npmignore
LICENSE
manifest.tt Bug 1517707. Update ESLint related modules to latest versions. r=mossop 2019-01-04 16:44:49 +00:00
package-lock.json Bug 1528751 - Add a custom eslint rule to check "consistent" if bracing. r=Standard8 2019-02-28 08:39:33 +00:00
package.json Bug 1528751 - Add a custom eslint rule to check "consistent" if bracing. r=Standard8 2019-02-28 08:39:33 +00:00
README.md
update.sh Bug 1471541 - switch to new tooltool url, r=jlund 2018-07-03 15:35:58 -07:00

eslint-plugin-mozilla

A collection of rules that help enforce JavaScript coding standard in the Mozilla project.

These are primarily developed and used within the Firefox build system (mozilla-central), but are made available for other related projects to use as well.

Installation

Within mozilla-central:

$ ./mach eslint --setup

Outside mozilla-central:

Install ESLint ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-mozilla:

$ npm install eslint-plugin-mozilla --save-dev

Documentation

For details about the rules, please see the firefox documentation page.

Source Code

The sources can be found at:

Bugs

Please file bugs in Bugzilla in the Lint component of the Testing product.

Tests

The tests can only be run from within mozilla-central. To run the tests:

./mach eslint --setup
cd tools/lint/eslint/eslint-plugin-mozilla
npm run test