DEV Community

Alexei Garban
Alexei Garban

Posted on

If ESLint won't let you build your NextJS 15 app because of no-unused-vars do this

Problem

When you try to deploy your new NEXTJs 15 site and see this error:

[!ERROR]
Warning: 'someParams' is defined but never used. no-unused-vars

You just need to disable a eslint configuration by adding a rule like this one:

rules:{
      "@typescript-eslint/no-unused-vars": "off"
     }
Enter fullscreen mode Exit fullscreen mode

So the complete eslint.config.mjs will look like this

import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
  baseDirectory: __dirname,

});

const eslintConfig = [
  ...compat.config({
    extends: ['next/core-web-vitals', 'next/typescript'],
    rules:{
      "@typescript-eslint/no-unused-vars": "off"
     }
  }),

]
export default eslintConfig;

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more