2 title: Formatters Reference
6 title: Formatters Reference
8 edit_link: https://github.com/eslint/eslint/edit/main/templates/formatter-examples.md.ejs
11 ESLint comes with several built-in formatters to control the appearance of the linting results, and supports third-party formatters as well.
13 You can specify a formatter using the `--format` or `-f` flag in the CLI. For example, `--format json` uses the `json` formatter.
15 The built-in formatter options are:
17 <% Object.keys(formatterResults).forEach(function(formatterName) { -%>
18 * [<%= formatterName %>](#<%= formatterName %>)
23 Examples of each formatter were created from linting `fullOfProblems.js` using the `.eslintrc.json` configuration shown below.
41 "extends": "eslint:recommended",
43 "consistent-return": 2,
46 "semi" : [1, "always"],
52 Tests the formatters with the CLI:
55 npx eslint --format <Add formatter here> fullOfProblems.js
58 ## Built-In Formatter Options
59 <% Object.keys(formatterResults).forEach(function(formatterName) { -%>
61 ### <%= formatterName %>
63 <%= formatterResults[formatterName].description %>
67 <% if (formatterName !== "html") { -%>
69 <%- formatterResults[formatterName].result %>
72 <iframe src="html-formatter-example.html" width="100%" height="460px"></iframe>