Next.js Discord

Discord Forum

no-unused-vars

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Avatar
Spectacled bearOP
Idk when they changed it, but now default create-next-app gives error instead of warning which is stupid.
//eslint.config.mjs
const eslintConfig = [
  ...compat.config({
    extends: ["next"],
    rules: {
      "@typescript-eslint/no-unused-vars": "warn",
    },
  }),
];

Tried this, but didn't warn. It gives no warning or errors at all.

1 Reply

Avatar
Spectacled bearOP
ok, so you have to do this exactly
const eslintConfig = [
  ...compat.config({
    extends: ["next/core-web-vitals", "next/typescript"],
    rules: {
      "@typescript-eslint/no-unused-vars": "warn",
    },
  }),
];

on top of that, you have close and restart vscode completely, restarting eslint server and ts-server will not work, thanks next.js, just fking brilliant idea