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

Commit

Permalink
fix: accessing failure private property
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Apr 5, 2021
1 parent 9fe2347 commit dd4d646
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { emit } from 'node:cluster';
import type * as Tslint from "tslint";
import type * as Ts from "typescript";
import type { JobMessage, ConfigMessage } from "./workerHelper"
import { RuleFailure } from 'tslint';

process.title = 'linter-tslint worker';

Expand Down Expand Up @@ -135,8 +136,8 @@ async function getProgram(Linter: typeof Tslint.Linter, configurationPath: strin
return program;
}

function getSeverity(failure) {
const severity = failure.ruleSeverity.toLowerCase();
function getSeverity(failure: RuleFailure) {
const severity = failure["ruleSeverity"].toLowerCase();
return ['info', 'warning', 'error'].includes(severity) ? severity : 'warning';
}

Expand Down

0 comments on commit dd4d646

Please sign in to comment.