ESLint ====== `ESLint `__ is a popular linter for JavaScript. Run Locally ----------- The mozlint integration of `ESLint `__ can be run using mach: .. parsed-literal:: $ mach lint --linter eslint Alternatively, omit the ``--linter eslint`` and run all configured linters, which will include ESLint. Configuration ------------- The ESLint mozilla-central integration uses a skip list to exclude certain directories from being linted. This lives in ``topsrcdir/.eslintignore``. If you don't wish your directory to be linted, it must be added here. The global configuration file lives in ``topsrcdir/.eslintrc``. This global configuration can be overridden by including an ``.eslintrc`` in the appropriate subdirectory. For an overview of the supported configuration, see `ESLint's documentation `__. Autofix ------- The eslint linter provides a ``--fix`` option. It is based on the upstream option. Sources ------- * `Configuration (YAML) `_ * `Source `_ ESLint Plugin Mozilla --------------------- In addition to default ESLint rules, there are several Mozilla-specific rules that are defined in the :doc:`Mozilla ESLint Plugin `. ESLint Plugin SpiderMonkey JS ----------------------------- In addition to default ESLint rules, there is an extra processor for SpiderMonkey code :doc:`Mozilla ESLint SpiderMonkey JS `. .. toctree:: :hidden: eslint-plugin-mozilla eslint-plugin-spidermonkey-js