Skip to content

Commit

Permalink
Add note about ESLint compatibility
Browse files Browse the repository at this point in the history
Fixes #59
  • Loading branch information
sindresorhus committed Nov 1, 2023
1 parent 458025a commit b9c1002
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
## Install

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

*To use this with ESLint, use version 5. Version 6 is [not compatible with ESLint](https://github.com/eslint/eslint/issues/15560).*

## Usage

### [XO](https://github.com/xojs/xo)
Expand Down Expand Up @@ -49,10 +51,10 @@ grunt.registerTask('default', ['eslint']);
### [gulp-eslint](https://github.com/adametry/gulp-eslint)

```js
const gulp = require('gulp');
const eslint = require('gulp-eslint');
import gulp from 'gulp';
import eslint from 'gulp-eslint';

gulp.task('lint', () =>
export const lint = (
gulp.src('file.js')
.pipe(eslint())
.pipe(eslint.format('pretty'))
Expand All @@ -62,7 +64,9 @@ gulp.task('lint', () =>
### [eslint-loader](https://github.com/MoOx/eslint-loader) *(webpack)*

```js
module.exports = {
import eslintFormatterPretty from 'eslint-formatter-pretty';

export default {
entry: ['file.js'],
module: {
rules: [
Expand All @@ -71,7 +75,7 @@ module.exports = {
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
formatter: require('eslint-formatter-pretty')
formatter: eslintFormatterPretty
}
}
]
Expand Down

0 comments on commit b9c1002

Please sign in to comment.