mach lintcommand. Simply pass in the directory or file you wish to lint (defaults to current working directory):
mach lintis configured to check Firefox code. Thunderbird has its own set of configurations. To use them, add the hidden option
--config-pathis always relative to the mozilla source directory, not your current directory.
$ ./mach lint --config-path=comm/tools/lint path/to/file.js
--config-pathis always relative to the source root, you can set up an alias in
~/.mozbuild/machrcso you don't have to remember the extra option. On Windows, you should find
comm/tools/lintare written so that they can be shared with the Seamonkey project. Thunderbird developers may want to set
MOZLINT_NO_SUITE=1in their environment so
mach lintwill not check
comm/editor. Taskcluster will also set
MOZLINT_NO_SUITEwhen running lint checks.