From c5f08dd1cf52e996f82143b80fbb2dfcf5a6c32e Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Tue, 5 Nov 2024 18:28:56 +0800 Subject: [PATCH] fix(cli): filter suggestions --- packages/cli/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cli/index.ts b/packages/cli/index.ts index 9386fd3..c54d8a6 100644 --- a/packages/cli/index.ts +++ b/packages/cli/index.ts @@ -150,6 +150,9 @@ import glob = require('glob'); else { const diagnostics = linter.lint(fileName); for (const diagnostic of diagnostics) { + if (diagnostic.category === ts.DiagnosticCategory.Suggestion) { + continue; + } let output = ts.formatDiagnosticsWithColorAndContext([diagnostic], { getCurrentDirectory: ts.sys.getCurrentDirectory, getCanonicalFileName: ts.sys.useCaseSensitiveFileNames ? x => x : x => x.toLowerCase(),