1 | import { ILinterOptions, Linter, LintResult } from 'tslint';
|
2 | import { Program, SourceFile } from 'typescript';
|
3 |
|
4 |
|
5 |
|
6 | const TSLintLinter = Linter as any;
|
7 |
|
8 | export class CustomLinter extends TSLintLinter {
|
9 | constructor(options: ILinterOptions, private readonly program: Program) {
|
10 | super(options, program);
|
11 | }
|
12 |
|
13 | getResult(): LintResult {
|
14 | return super.getResult();
|
15 | }
|
16 |
|
17 | getSourceFile(fileName: string): SourceFile | undefined {
|
18 | return this.program.getSourceFile(fileName);
|
19 | }
|
20 | }
|