From 081db2a11bd4bc7770320dcd43c4d4afcaba9c10 Mon Sep 17 00:00:00 2001 From: Yavor Ivanov Date: Wed, 13 Mar 2024 11:55:43 +0200 Subject: [PATCH] fix: Log issues with absolute path --- src/formatter/text.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/formatter/text.ts b/src/formatter/text.ts index 0e3cfca92..9df08722b 100644 --- a/src/formatter/text.ts +++ b/src/formatter/text.ts @@ -1,4 +1,5 @@ import chalk from "chalk"; +import path from "node:path"; import {LintMessageSeverity, LintResult, LintMessage} from "../detectors/AbstractDetector.js"; function formatSeverity(severity: LintMessageSeverity) { @@ -42,7 +43,7 @@ export class Text { totalWarningCount += warningCount; totalFatalErrorCount += fatalErrorCount; - this.#writeln(chalk.inverse(filePath)); + this.#writeln(chalk.inverse(path.resolve(process.cwd(), filePath))); // Group messages by rule const rules = new Map();