From 988f3567e085a47ff9e4930e71908d7615dc5602 Mon Sep 17 00:00:00 2001 From: skrtheboss Date: Wed, 24 Jul 2024 09:19:47 +0200 Subject: [PATCH] fix(linter): ensure too many warnings is only logged if enabled --- packages/eslint/src/executors/lint/lint.impl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint/src/executors/lint/lint.impl.ts b/packages/eslint/src/executors/lint/lint.impl.ts index 92e8f9f74ff5d..aa799e6144c20 100644 --- a/packages/eslint/src/executors/lint/lint.impl.ts +++ b/packages/eslint/src/executors/lint/lint.impl.ts @@ -200,7 +200,7 @@ Please see https://nx.dev/recipes/tips-n-tricks/eslint for full guidance on how outputPrintInfo(totals); } - if (totals.warnings > options.maxWarnings) { + if (options.maxWarnings >= 0 && totals.warnings > options.maxWarnings) { console.info( `ESLint found too many warnings (maximum: ${options.maxWarnings}).` );