Skip to content

Commit 8d8f2d6

Browse files
authored
WIP: enable tslint and fix tslint warnings (#1148)
* Enable tslint - clean up main.ts * Clean up tslint warings in rest of top-level ts files * WIP - eliminate more tslint warnings * Fix more tslint warnings * More TSLINT cleanup * More TSLINT warning cleanup * Close to final on TSLINT cleanup * Add recommended extensions.json * Address PR feedback, manually tested * Fix tslint warning on shadowed var name
1 parent 1347f99 commit 8d8f2d6

35 files changed

+1665
-1592
lines changed

.vscode/extensions.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"msjsdiag.debugger-for-chrome",
6+
"ms-vscode.PowerShell",
7+
"eg2.tslint",
8+
"DavidAnson.vscode-markdownlint"
9+
]
10+
}

examples/.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// Relative paths for this setting are always relative to the workspace root dir.
44
"powershell.scriptAnalysis.settingsPath": "./PSScriptAnalyzerSettings.psd1",
55
"files.defaultLanguage": "powershell"
6-
}
6+
}

package-lock.json

+165
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
"vscode-languageclient": "3.3.0"
4141
},
4242
"devDependencies": {
43+
"@types/mocha": "^2.2.32",
4344
"@types/node": "^6.0.40",
45+
"mocha": "^2.3.3",
46+
"tslint": "^5.8.0",
4447
"typescript": "2.3.x",
4548
"vsce": "^1.18.0",
46-
"vscode": "^1.1.0",
47-
"mocha": "^2.3.3",
48-
"@types/mocha": "^2.2.32"
49+
"vscode": "^1.1.0"
4950
},
5051
"extensionDependencies": [
5152
"vscode.powershell"

src/controls/animatedStatusBar.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
*--------------------------------------------------------*/
44

55
import {
6-
StatusBarItem,
6+
Disposable,
77
StatusBarAlignment,
8+
StatusBarItem,
89
ThemeColor,
9-
Disposable,
1010
window} from "vscode";
1111

1212
export function showAnimatedStatusBarMessage(text: string, hideWhenDone: Thenable<any>): Disposable {
13-
let animatedStatusBarItem: AnimatedStatusBarItem = new AnimatedStatusBarItem(text);
13+
const animatedStatusBarItem: AnimatedStatusBarItem = new AnimatedStatusBarItem(text);
1414
animatedStatusBarItem.show(hideWhenDone);
1515
return animatedStatusBarItem;
1616
}
@@ -73,7 +73,7 @@ class AnimatedStatusBarItem implements StatusBarItem {
7373
this.counter = 0;
7474
this.suffixStates = [" ", ". ", ".. ", "..."];
7575
this.maxCount = this.suffixStates.length;
76-
this.timerInterval = ((1/this.maxCount) * 1000) / this.animationRate;
76+
this.timerInterval = ((1 / this.maxCount) * 1000) / this.animationRate;
7777
this.elapsedTime = 0;
7878
}
7979

@@ -121,4 +121,4 @@ class AnimatedStatusBarItem implements StatusBarItem {
121121
private stop(): void {
122122
clearInterval(this.intervalId);
123123
}
124-
}
124+
}

0 commit comments

Comments
 (0)