From 1d74ccd8f2e045e51ecf8e5ecd48d4e0796db1aa Mon Sep 17 00:00:00 2001 From: Houssein Djirdeh Date: Mon, 14 Jun 2021 17:56:23 -0400 Subject: [PATCH] adds section to docs for migrating existing eslint configurations --- docs/basic-features/eslint.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/basic-features/eslint.md b/docs/basic-features/eslint.md index 6d16e640f5c76..060147631f379 100644 --- a/docs/basic-features/eslint.md +++ b/docs/basic-features/eslint.md @@ -148,3 +148,18 @@ A stricter `next/core-web-vitals` rule set can also be added in `.eslintrc`: `next/core-web-vitals` updates `eslint-plugin-next` to error on a number of rules that are warnings by default if they affect [Core Web Vitals](https://web.dev/vitals/). > 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). + +## 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. + +```js +module.exports = { + extends: [ + //... + 'plugin:@next/next/recommended', + ], +} +``` + +This eliminates any risk of collisions that can occur due to importing the same plugin or parser across multiple configurations.