-
SummaryI've just created a new project, that I'm tweaking. After run
Because it validates .next directory. This is the config file: 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.extends('next/core-web-vitals', 'next/typescript'),
{
rules: {
'@typescript-eslint/no-empty-object-type': 'off'
},
ignores: ['node_modules/**', '.next/**', 'out/**', 'build/**', 'next-env.d.ts']
}
];
export default eslintConfig; It's default file, I only added rules to disable one rule that give error from CharkaUI setup. Additional informationCheck my project. Run:
Example |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Looks like an issue within the documentation of ignores in ESLint: Moving ignores to its own entry in the config does the trick: const eslintConfig = [
...compat.extends('next/core-web-vitals', 'next/typescript'),
{
rules: {
'@typescript-eslint/no-empty-object-type': 'off'
}
},
{
ignores: ['node_modules/**', '.next/**', 'out/**', 'build/**', 'next-env.d.ts']
}
]; |
Beta Was this translation helpful? Give feedback.
-
I would like to add to @icyJoseph comment -
|
Beta Was this translation helpful? Give feedback.
Looks like an issue within the documentation of ignores in ESLint:
Moving ignores to its own entry in the config does the trick: