Skip to content

Commit c0f5e7a

Browse files
committed
TSLint readonly
1 parent 6c2cde1 commit c0f5e7a

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/git/blame.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export class GitBlame {
5959
}
6060

6161
private disposable: Disposable;
62-
private statusBarView: StatusBarView;
63-
private files: { [fileName: string]: GitFile } = {};
62+
private readonly statusBarView: StatusBarView;
63+
private readonly files: { [fileName: string]: GitFile } = {};
6464

6565
constructor() {
6666
this.statusBarView = StatusBarView.getInstance();

src/git/filephysical.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { GitBlameStream } from "./stream";
1414

1515
export class GitFilePhysical extends GitFile {
1616
private blameInfoPromise: Promise<IGitBlameInfo>;
17-
private fileSystemWatcher: FileSystemWatcher;
17+
private readonly fileSystemWatcher: FileSystemWatcher;
1818
private workTreePromise: Promise<string>;
1919
private blameProcess: GitBlameStream;
2020

src/git/stream.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import { GitBlame } from "./blame";
1212
export class GitBlameStream extends EventEmitter {
1313
private static readonly HASH_PATTERN: RegExp = /[a-z0-9]{40}/;
1414

15-
private file: Uri;
16-
private workTree: string;
15+
private readonly file: Uri;
16+
private readonly workTree: string;
1717
private process: ChildProcess;
18-
private emittedCommits: { [hash: string]: true } = {};
18+
private readonly emittedCommits: { [hash: string]: true } = {};
1919

2020
constructor(file: Uri, workTree: string) {
2121
super();

src/util/errorhandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class ErrorHandler {
4040
return `${hour}:${minute}:${second}`;
4141
}
4242

43-
private outputChannel: OutputChannel;
43+
private readonly outputChannel: OutputChannel;
4444

4545
private constructor() {
4646
this.outputChannel = window.createOutputChannel("Extension: gitblame");

src/view.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export class StatusBarView {
1616
}
1717

1818
private static instance: StatusBarView;
19-
private statusBarItem: StatusBarItem;
19+
private readonly statusBarItem: StatusBarItem;
2020
private progressInterval: NodeJS.Timer;
21-
private spinner: Spinner;
21+
private readonly spinner: Spinner;
2222
private spinnerActive: boolean = false;
23-
private prefix: string = "$(git-commit)";
23+
private readonly prefix: string = "$(git-commit)";
2424

2525
private constructor() {
2626
this.statusBarItem = window.createStatusBarItem(

tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"max-line-length": {
1010
"options": [80]
1111
},
12-
"prefer-readonly": true,
12+
"prefer-readonly": [true],
1313
"no-require-imports": true,
1414
"no-duplicate-imports": true
1515
},

0 commit comments

Comments
 (0)