Skip to content

Commit ef97d9b

Browse files
adds section to docs for migrating existing eslint configurations (#26101)
1 parent 66cb786 commit ef97d9b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/basic-features/eslint.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,18 @@ A stricter `next/core-web-vitals` rule set can also be added in `.eslintrc`:
148148
`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/).
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).
151+
152+
## Migrating Existing Config
153+
154+
If you already have ESLint configured in your application, we recommend extending directly from the Next.js ESLint plugin instead of the shareable configuration.
155+
156+
```js
157+
module.exports = {
158+
extends: [
159+
//...
160+
'plugin:@next/next/recommended',
161+
],
162+
}
163+
```
164+
165+
This eliminates any risk of collisions that can occur due to importing the same plugin or parser across multiple configurations.

0 commit comments

Comments
 (0)