From c97a2f711912b66a8ab48beac900363b2b0033da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Ara=C3=BAjo?= Date: Fri, 18 Jun 2021 21:25:28 -0300 Subject: [PATCH 1/2] Update eslint.md --- docs/basic-features/eslint.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/basic-features/eslint.md b/docs/basic-features/eslint.md index 060147631f379..0635548073e7d 100644 --- a/docs/basic-features/eslint.md +++ b/docs/basic-features/eslint.md @@ -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 + +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. + +``` +{ + "extends": ["next", "prettier"] +} +``` + ## 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. From e2c7f7786f303676ec338ba8bc8cc809cbf93d8f Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Sun, 20 Jun 2021 15:55:12 -0500 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/basic-features/eslint.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/basic-features/eslint.md b/docs/basic-features/eslint.md index 0635548073e7d..33dadda8ccbd9 100644 --- a/docs/basic-features/eslint.md +++ b/docs/basic-features/eslint.md @@ -149,11 +149,11 @@ 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 +## Usage with Prettier -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. +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. -``` +```js { "extends": ["next", "prettier"] }