After the latest next update, I faced the same issue. I added the file
next-env.d.ts
to eslint.config.mjs ignore, but as it did not worked, I had to add this:
{
files: ["next-env.d.ts"], // 👈 override
rules: {
"@typescript-eslint/triple-slash-reference": "off",
},
}