#Skip ESLint rule in specific part of the component
5 messages · Page 1 of 1 (latest)
Yes, you can disable a specific eslint rule by editing your eslintrc.json file.
Copy the name of the category of the warning/error you want to disable (i.e. when you run npm run lint), like so:
{
"env": { "browser": true, "node": true, "es6": true },
"extends": ["eslint:recommended", "next", "next/core-web-vitals"],
"rules": {
"@next/next/no-img-element": "off",
"no-unused-vars": "off",
"react-hooks/exhaustive-deps": "off"
}
}