Skip to content

Commit

Permalink
Update eslint.md with instructions for installing Prettier plugin dep…
Browse files Browse the repository at this point in the history
…endency (#29764)

Added install instructions for eslint-config-prettier before adding Prettier to the ESLint config.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [X] Make sure the linting passes
  • Loading branch information
TimBarley authored Oct 18, 2021
1 parent 4bbe265 commit b794c17
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/basic-features/eslint.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ The `next/core-web-vitals` rule set is enabled when `next lint` is run for the f

ESLint also contains code formatting rules, which can conflict with your existing [Prettier](https://prettier.io/) setup. We recommend including [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) in your ESLint config to make ESLint and Prettier work together.

First, install the dependency:

```bash
npm install --save-dev eslint-config-prettier
# or
yarn add --dev eslint-config-prettier
```

Then, add `prettier` to your existing ESLint config:

```json
{
"extends": ["next", "prettier"]
Expand Down

0 comments on commit b794c17

Please sign in to comment.