Skip to content

Commit

Permalink
WIP: enable tslint and fix tslint warnings (#1148)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rkeithhill authored Jan 20, 2018
1 parent 1347f99 commit 8d8f2d6
Show file tree
Hide file tree
Showing 35 changed files with 1,665 additions and 1,592 deletions.
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"msjsdiag.debugger-for-chrome",
"ms-vscode.PowerShell",
"eg2.tslint",
"DavidAnson.vscode-markdownlint"
]
}
2 changes: 1 addition & 1 deletion examples/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// Relative paths for this setting are always relative to the workspace root dir.
"powershell.scriptAnalysis.settingsPath": "./PSScriptAnalyzerSettings.psd1",
"files.defaultLanguage": "powershell"
}
}
165 changes: 165 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@
"vscode-languageclient": "3.3.0"
},
"devDependencies": {
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.40",
"mocha": "^2.3.3",
"tslint": "^5.8.0",
"typescript": "2.3.x",
"vsce": "^1.18.0",
"vscode": "^1.1.0",
"mocha": "^2.3.3",
"@types/mocha": "^2.2.32"
"vscode": "^1.1.0"
},
"extensionDependencies": [
"vscode.powershell"
Expand Down
10 changes: 5 additions & 5 deletions src/controls/animatedStatusBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
*--------------------------------------------------------*/

import {
StatusBarItem,
Disposable,
StatusBarAlignment,
StatusBarItem,
ThemeColor,
Disposable,
window} from "vscode";

export function showAnimatedStatusBarMessage(text: string, hideWhenDone: Thenable<any>): Disposable {
let animatedStatusBarItem: AnimatedStatusBarItem = new AnimatedStatusBarItem(text);
const animatedStatusBarItem: AnimatedStatusBarItem = new AnimatedStatusBarItem(text);
animatedStatusBarItem.show(hideWhenDone);
return animatedStatusBarItem;
}
Expand Down Expand Up @@ -73,7 +73,7 @@ class AnimatedStatusBarItem implements StatusBarItem {
this.counter = 0;
this.suffixStates = [" ", ". ", ".. ", "..."];
this.maxCount = this.suffixStates.length;
this.timerInterval = ((1/this.maxCount) * 1000) / this.animationRate;
this.timerInterval = ((1 / this.maxCount) * 1000) / this.animationRate;
this.elapsedTime = 0;
}

Expand Down Expand Up @@ -121,4 +121,4 @@ class AnimatedStatusBarItem implements StatusBarItem {
private stop(): void {
clearInterval(this.intervalId);
}
}
}
Loading

0 comments on commit 8d8f2d6

Please sign in to comment.