These tools can be used via the command line or right in your code editor.
Via the Command Line
For a single file, run this command, which will attempt to automatically fix any linting or formatting problems:
$ ../mach lint path/to/a/file.js --fix
Or for all the files in a given directory:
$ ../mach lint path/to/a/directory/ --fix
To simply report any problems but not attempt to automatically fix them, just omit the --fix flag:
$ ../mach lint path/to/a/file.js
In a Code Editor
Most popular code editors offer plugins for eslint and Prettier. We highly recommend installing a plugin for eslint and a plugin for Prettier so you can lint and format your code as you are editing it. Issues will be highlighted as you type and you can have Prettier format your code with a few key strokes.