# eslint-formatter-pretty

> Pretty formatter for ESLint

Latest version **7.1.0** (published 2026-04-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-formatter-pretty
pnpm add eslint-formatter-pretty
yarn add eslint-formatter-pretty
bun add eslint-formatter-pretty
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2026-04-14 |
| First published | 2016-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 8 |
| Unpacked size | 10.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 553 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | eslint, eslint-formatter, formatter, reporter, lint, validate |

## Links

- npm: https://www.npmjs.com/package/eslint-formatter-pretty
- Repository: https://github.com/sindresorhus/eslint-formatter-pretty
- Homepage: https://github.com/sindresorhus/eslint-formatter-pretty#readme
- Issues: https://github.com/sindresorhus/eslint-formatter-pretty/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/eslint-formatter-pretty

## Dependencies (8)

- [plur](https://npm.io/package/plur.md) ^5.1.0
- [chalk](https://npm.io/package/chalk.md) ^5.6.2
- [log-symbols](https://npm.io/package/log-symbols.md) ^7.0.1
- [ansi-escapes](https://npm.io/package/ansi-escapes.md) ^7.1.0
- [string-width](https://npm.io/package/string-width.md) ^8.1.0
- [@types/eslint](https://npm.io/package/@types/eslint.md) ^9.6.1
- [eslint-rule-docs](https://npm.io/package/eslint-rule-docs.md) ^1.1.235
- [supports-hyperlinks](https://npm.io/package/supports-hyperlinks.md) ^4.3.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 7.1.0 (latest) — 2026-04-14
- 7.0.0 — 2025-09-23
- 6.0.1 — 2024-01-02
- 6.0.0 — 2023-10-28
- 5.0.0 — 2023-03-20
- 4.1.0 — 2021-06-05
- 4.0.0 — 2020-06-13
- 3.0.1 — 2019-11-19
- 3.0.0 — 2019-11-13
- 2.1.1 — 2019-01-21
- 2.1.0 — 2019-01-16
- 2.0.0 — 2018-11-13
- 1.3.0 — 2017-09-05
- 1.2.0 — 2017-09-05
- 1.1.0 — 2016-10-09
- … 9 more at https://npm.io/package/eslint-formatter-pretty/versions

## README

# eslint-formatter-pretty

> Pretty formatter for [ESLint](https://eslint.org)

![](screenshot.png)

## Highlights

- Pretty output.
- Sorts results by severity.
- Stylizes inline codeblocks in messages.
- Command-click a rule ID to open its docs.
- Click a filename header to open the file in your editor.

## Install

```sh
npm install --save-dev eslint-formatter-pretty
```

*Please note that to use version 6 of this package you will HAVE to use ESLint v9+. If you're using ESLint v8 or below, install with `npm install --save-dev eslint-formatter-pretty@5` instead.*

## Usage

### [XO](https://github.com/xojs/xo)

Nothing to do. It's the default formatter.

### ESLint CLI

```sh
eslint --format=pretty file.js
```

### [grunt-eslint](https://github.com/sindresorhus/grunt-eslint)

```js
grunt.initConfig({
	eslint: {
		target: ['file.js'],
		options: {
			format: 'pretty'
		}
	}
});

grunt.loadNpmTasks('grunt-eslint');
grunt.registerTask('default', ['eslint']);
```

### [gulp-eslint](https://github.com/adametry/gulp-eslint)

```js
import gulp from 'gulp';
import eslint from 'gulp-eslint';

export const lint = (
	gulp.src('file.js')
		.pipe(eslint())
		.pipe(eslint.format('pretty'))
);
```

### [eslint-loader](https://github.com/MoOx/eslint-loader) *(webpack)*

```js
import eslintFormatterPretty from 'eslint-formatter-pretty';

export default {
	entry: ['file.js'],
	module: {
		rules: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				loader: 'eslint-loader',
				options: {
					formatter: eslintFormatterPretty
				}
			}
		]
	}
};
```

## Tips

In terminals with [hyperlink support](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#supporting-apps), click the filename header to open the file in your editor, or click a rule ID to open its documentation.

In iTerm, <kbd>Command</kbd>-click the filename headers (like `index.js`) to open files at the specific line and column.

---
_Source: https://npm.io/package/eslint-formatter-pretty · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
