فهرست منبع

TSLint: Allow leading underscores in variable names

Danilo Bargen 8 سال پیش
والد
کامیت
4641e7458f
2فایلهای تغییر یافته به همراه8 افزوده شده و 7 حذف شده
  1. 6 6
      src/partials/welcome.ts
  2. 2 1
      tslint.json

+ 6 - 6
src/partials/welcome.ts

@@ -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;
@@ -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,
@@ -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;
@@ -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();
         }
@@ -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);
@@ -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();
         }

+ 2 - 1
tslint.json

@@ -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"]
     }
 }