Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit dd4d646

Browse files
committed
fix: accessing failure private property
1 parent 9fe2347 commit dd4d646

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/worker.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type { emit } from 'node:cluster';
1313
import type * as Tslint from "tslint";
1414
import type * as Ts from "typescript";
1515
import type { JobMessage, ConfigMessage } from "./workerHelper"
16+
import { RuleFailure } from 'tslint';
1617

1718
process.title = 'linter-tslint worker';
1819

@@ -135,8 +136,8 @@ async function getProgram(Linter: typeof Tslint.Linter, configurationPath: strin
135136
return program;
136137
}
137138

138-
function getSeverity(failure) {
139-
const severity = failure.ruleSeverity.toLowerCase();
139+
function getSeverity(failure: RuleFailure) {
140+
const severity = failure["ruleSeverity"].toLowerCase();
140141
return ['info', 'warning', 'error'].includes(severity) ? severity : 'warning';
141142
}
142143

0 commit comments

Comments
 (0)