зеркало из https://github.com/mozilla/gecko-dev.git
836c33084c
Differential Revision: https://phabricator.services.mozilla.com/D33011 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
lib | ||
reporters | ||
scripts | ||
tests | ||
.npmignore | ||
LICENSE | ||
README.md | ||
manifest.tt | ||
package-lock.json | ||
package.json | ||
update.sh |
README.md
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:
- Code: https://dxr.mozilla.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla
- Documentation: https://dxr.mozilla.org/mozilla-central/source/tools/lint/docs/linters
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