Skip to content

Commit 2a5db0b

Browse files
authored
Docs: Add Prettier section on ESLint page (#26347)
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## 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. ## Documentation / Examples - [x] Make sure the linting passes
1 parent d88f484 commit 2a5db0b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/basic-features/eslint.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ A stricter `next/core-web-vitals` rule set can also be added in `.eslintrc`:
149149
150150
> Both `next` and `next/core-web-vitals` entry points are automatically included for new applications built with [Create Next App](/docs/api-reference/create-next-app.md).
151151
152+
## Usage with Prettier
153+
154+
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.
155+
156+
```js
157+
{
158+
"extends": ["next", "prettier"]
159+
}
160+
```
161+
152162
## Migrating Existing Config
153163

154164
If you already have ESLint configured in your application, we recommend extending directly from the Next.js ESLint plugin instead of the shareable configuration.

0 commit comments

Comments
 (0)