Skip to content

WIP: enable tslint and fix tslint warnings #1148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 20, 2018
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"
}
}
167 changes: 166 additions & 1 deletion 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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alpha sorting 😍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that is one of the things that TSLINT is picky about.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's beautiful 😍

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