gecko-dev/tools/lint/eslint/eslint-plugin-mozilla
Mark Banner ce668e4afd Bug 1515942 - Enable ESLint for gfx/ (manual fixes). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D15206

--HG--
extra : moz-landing-system : lando
2018-12-27 09:45:01 +00:00
..
lib Bug 1515942 - Enable ESLint for gfx/ (manual fixes). r=kats 2018-12-27 09:45:01 +00:00
reporters Bug 1379119 - Add a mozilla specific reporter for mocha when used with eslint-plugin-mozilla to be compatible with treeherder. r=ahal 2017-07-10 17:08:53 +01:00
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 1415483 - Extend reject-importGlobalProperties to reject any priviliged items already in scope. r=mossop 2018-12-11 21:39:38 +00:00
.npmignore Bug 1379119 - Add a builder to run the unit tests for eslint-plugin-mozilla. r=ahal 2017-07-10 15:27:00 +01:00
LICENSE
README.md Bug 1395956 - Update gecko.readthedocs links to the new firefox-source-docs.mozilla.org location. r=chutten 2017-09-02 22:11:02 +05:30
manifest.tt Bug 1456078 - Upgrade ESLint to version 5.3.0, and eslint-plugin-html to 4.0.5. r=mossop 2018-08-07 14:46:19 +00:00
package-lock.json Bug 1515952 - Allow ESLint rule spaced-comment to accept source-map comments. r=mossop 2018-12-21 18:05:39 +00:00
package.json Bug 1515952 - Allow ESLint rule spaced-comment to accept source-map comments. r=mossop 2018-12-21 18:05:39 +00:00
update.sh Bug 1471541 - switch to new tooltool url, r=jlund 2018-07-03 15:35:58 -07:00

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:

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