I am getting error in eslint. I tried searching for solutions but couldn't find any. Can anyone help
80.57 Linting and checking validity of types ...
115.9 Failed to compile.
115.9
115.9 .eslintrc.cjs:8:13
115.9 Type error: Type 'string' has no properties in common with type 'Plugin'.
115.9
115.9 6 | tsconfigRootDir: __dirname,
115.9 7 | },
115.9 > 8 | plugins: ["@typescript-eslint"],
115.9 | ^
115.9 9 | extends: [
115.9 10 | "next/core-web-vitals",
115.9 11 | "plugin:@typescript-eslint/recommended",
3 Replies
You seem to be using
@types/eslint
v9. Next currently doesn't supports eslint v9
https://github.com/vercel/next.js/issues/64409GitHub
next-lint Doesn't Support ESLint 9 · Issue #64409 · vercel/next.js
Link to the code that reproduces this issue https://codesandbox.io/p/devbox/vigilant-pine-6wmz8y To Reproduce Add next lint script to package.json per https://nextjs.org/docs/app/building-your-appl...
even specifying eslint version to 8.57 gives the same error
How do you declare types for .eslintrc.cjs?