1ESLint 2====== 3 4`ESLint`_ is a popular linter for JavaScript. 5 6Run Locally 7----------- 8 9The mozlint integration of `ESLint`_ can be run using mach: 10 11.. parsed-literal:: 12 13 $ mach lint --linter eslint <file paths> 14 15Alternatively, omit the ``--linter eslint`` and run all configured linters, which will include 16ESLint. 17 18 19Configuration 20------------- 21 22The `ESLint`_ mozilla-central integration uses a blacklist to exclude certain directories from being 23linted. This lives in ``topsrcdir/.eslintignore``. If you don't wish your directory to be linted, it 24must be added here. 25 26The global configuration file lives in ``topsrcdir/.eslintrc``. This global configuration can be 27overridden by including an ``.eslintrc`` in the appropriate subdirectory. For an overview of the 28supported configuration, see `ESLint's documentation`_. 29 30 31ESLint Plugin Mozilla 32--------------------- 33 34In addition to default ESLint rules, there are several Mozilla-specific rules that are defined in 35the :doc:`Mozilla ESLint Plugin <eslint-plugin-mozilla>`. 36 37 38.. _ESLint: http://eslint.org/ 39.. _ESLint's documentation: http://eslint.org/docs/user-guide/configuring 40 41 42.. toctree:: 43 :hidden: 44 45 eslint-plugin-mozilla 46