Skip to content

Commit

Permalink
TSLint: Allow leading underscores in variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
threema-danilo committed May 2, 2018
1 parent 58a1f8b commit 4641e74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/partials/welcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class WelcomeController {

// Custom services
private webClientService: WebClientService;
private TrustedKeyStore: TrustedKeyStoreService;
private trustedKeyStore: TrustedKeyStoreService;
private pushService: PushService;
private stateService: StateService;
private config: threema.Config;
Expand All @@ -84,7 +84,7 @@ class WelcomeController {
$timeout: ng.ITimeoutService, $interval: ng.IIntervalService,
$log: ng.ILogService, $window: ng.IWindowService, $mdDialog: ng.material.IDialogService,
$translate: ng.translate.ITranslateService,
webClientService: WebClientService, TrustedKeyStore: TrustedKeyStoreService,
webClientService: WebClientService, trustedKeyStore: TrustedKeyStoreService,
stateService: StateService, pushService: PushService,
browserService: BrowserService,
versionService: VersionService,
Expand All @@ -104,7 +104,7 @@ class WelcomeController {

// Own services
this.webClientService = webClientService;
this.TrustedKeyStore = TrustedKeyStore;
this.trustedKeyStore = trustedKeyStore;
this.stateService = stateService;
this.pushService = pushService;
this.config = config;
Expand Down Expand Up @@ -137,7 +137,7 @@ class WelcomeController {
}

// Determine whether local storage is available
if (this.TrustedKeyStore.blocked === true) {
if (this.trustedKeyStore.blocked === true) {
$log.error('Cannot access local storage. Is it being blocked by a browser add-on?');
this.showLocalStorageWarning();
}
Expand All @@ -161,7 +161,7 @@ class WelcomeController {
// Determine whether trusted key is available
let hasTrustedKey = null;
try {
hasTrustedKey = this.TrustedKeyStore.hasTrustedKey();
hasTrustedKey = this.trustedKeyStore.hasTrustedKey();
} catch (e) {
$log.error('Exception while accessing local storage:', e);
this.showLocalStorageException(e);
Expand Down Expand Up @@ -257,7 +257,7 @@ class WelcomeController {
* Decrypt the keys and initiate the session.
*/
private unlockConfirm(): void {
const decrypted: threema.TrustedKeyStoreData = this.TrustedKeyStore.retrieveTrustedKey(this.password);
const decrypted: threema.TrustedKeyStoreData = this.trustedKeyStore.retrieveTrustedKey(this.password);
if (decrypted === null) {
return this.showDecryptionFailed();
}
Expand Down
3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"only-arrow-functions": false,
"quotemark": [true, "single", "avoid-escape"],
"indent": [true, "spaces"],
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-rest-spread", "check-type", "check-typecast", "check-type-operator", "check-preblock"]
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-rest-spread", "check-type", "check-typecast", "check-type-operator", "check-preblock"],
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore", "allow-pascal-case"]
}
}

0 comments on commit 4641e74

Please sign in to comment.