fune/tools/lint/eslint/eslint-plugin-mozilla
2023-09-05 12:59:31 +00:00
..
lib Bug 1563927 - Add JSON linting via ESLint. r=Gijs 2023-09-05 12:59:31 +00:00
reporters Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish 2023-05-20 12:26:49 +00:00
scripts
tests Bug 1846356 - Convert remaining ESLint rules to use messageIds and data values rather than message strings. r=cmkm 2023-08-02 22:23:59 +00:00
.npmignore
LICENSE
manifest.tt Bug 1563927 - Add JSON linting via ESLint. r=Gijs 2023-09-05 12:59:31 +00:00
package-lock.json Bug 1563927 - Add JSON linting via ESLint. r=Gijs 2023-09-05 12:59:31 +00:00
package.json Bug 1563927 - Add JSON linting via ESLint. r=Gijs 2023-09-05 12:59:31 +00:00
README.md
update.sh

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