ESLINT_NEXT_RULES_REQUIRED
Requires that a workspace package is configured with required Next.js plugins and rulesConformance is available on Enterprise plans
This Conformance check requires that ESLint plugins for Next.js are configured correctly in your application, including:
These plugins help to catch common Next.js issues, including performance.
A Conformance error occurred in test "ESLINT_NEXT_RULES_REQUIRED".
These ESLint plugins must have rules configured to run: @next/next
To find out more information and how to fix this error, visit
https://vercel.com/docs/workflow-collaboration/conformance/rules/ESLINT_NEXT_RULES_REQUIRED.
If this violation should be ignored, add the following entry to
/apps/dashboard/.allowlists/ESLINT_NEXT_RULES_REQUIRED.allowlist.json and
get approval from the appropriate person.
{
"testName": "ESLINT_NEXT_RULES_REQUIRED",
"reason": "TODO: Add reason why this violation is allowed to be ignored.",
"location": {
"workspace": "dashboard"
},
}
This check requires that certain ESLint plugins are installed and rules within those plugins are configured to be errors. If you are missing required plugins, you will receive an error such as:
ESLint configuration is missing required security plugins:
Missing plugins: @next/next
Registered plugins: import and @typescript-eslint
For more information on ESLint plugins and rules, see plugins and rules.
The recommended approach for configuring ESLint in a monorepo is to have a shared ESLint config in an internal package. See the Turbo docs on ESLint to get started.
Once your monorepo has a shared ESLint config, you can add a .eslintrc.cjs
file to the root folder of your workspace with the contents:
module.exports = {
root: true,
extends: ['eslint-config-custom/base'],
};
You should also add "eslint-config-custom": "workspace:*"
to your
devDependencies
.
Was this helpful?