Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add Prettier section on ESLint page #26347

Merged
merged 3 commits into from
Jun 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/basic-features/eslint.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ A stricter `next/core-web-vitals` rule set can also be added in `.eslintrc`:

> 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).

## Prettier
leerob marked this conversation as resolved.
Show resolved Hide resolved

ESLint doesn't contain only code quality rules, but also stylistic rules that are unnecessary and conflicting if you have you been using [Prettier](https://prettier.io/). We recommend including [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) in your ESLint config to make ESLint and Prettier be harmonious with each other.
leerob marked this conversation as resolved.
Show resolved Hide resolved

```
{
"extends": ["next", "prettier"]
leerob marked this conversation as resolved.
Show resolved Hide resolved
}
```

## Migrating Existing Config

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