From 06b339b669d59b06b2fe17b16c15f63f5213096c Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Tue, 12 Dec 2023 14:57:42 +0100 Subject: [PATCH] feat(linter): add .nx to ignored folders --- .../eslint/src/generators/init/global-eslint-config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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; };