Next.js Discord

Discord Forum

Difference between extending and including in ESLint configuration

Answered
Yellow and black potter wasp posted this in #help-forum
Open in Discord
Yellow and black potter waspOP
I'm reviewing the ESLint configuration documentation for Next.js and came across this statement:

Documentation URL : https://nextjs.org/docs/app/building-your-application/configuring/eslint

"If you already have ESLint configured in your application, we recommend extending from this plugin directly instead of including eslint-config-next unless a few conditions are met. Refer to the Recommended Plugin Ruleset to learn more."

I'm not entirely clear on the difference between extending and including in this context. Could someone please explain the distinction between these two approaches and when it's appropriate to use one over the other?
Answered by Yellow and black potter wasp
I may have found the answer myself.

Extending: The mentioned "this plugin," which is eslint-plugin-next, is a ruleset collection that allows you to manually apply the desired rules.

Including: The mentioned "eslint-config-next" is a ruleset collection that allows you to directly apply the recommended rules.
View full answer

1 Reply

Yellow and black potter waspOP
I may have found the answer myself.

Extending: The mentioned "this plugin," which is eslint-plugin-next, is a ruleset collection that allows you to manually apply the desired rules.

Including: The mentioned "eslint-config-next" is a ruleset collection that allows you to directly apply the recommended rules.
Answer