Unverified Commit b794c171 authored by Tim Barley's avatar Tim Barley Committed by GitHub

Update eslint.md with instructions for installing Prettier plugin dependency (#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
parent 4bbe2651
......@@ -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"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment