diff --git a/packages/eslint/src/generators/init/global-eslint-config.ts b/packages/eslint/src/generators/init/global-eslint-config.ts index 36d227b43f805..83656e2bf845c 100644 --- a/packages/eslint/src/generators/init/global-eslint-config.ts +++ b/packages/eslint/src/generators/init/global-eslint-config.ts @@ -4,6 +4,7 @@ import { addImportToFlatConfig, addPluginsToExportsBlock, createNodeList, + generateAst, generateFlatOverride, stringifyNodeList, } from '../utils/flat-config/ast-utils'; @@ -121,6 +122,13 @@ export const getGlobalFlatEslintConfiguration = ( generateFlatOverride(jestOverride) ); } + // add ignore for .nx folder + content = addBlockToFlatConfigExport( + content, + generateAst({ + ignores: ['.nx'], + }) + ); return content; };