uchaindb/UClient

View on GitHub
src/ClientApp/app/components/user/login.page.ts

Summary

Maintainability
F
3 days
Test Coverage

File login.page.ts has 290 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Component, OnInit, OnDestroy, Input, Inject, isDevMode } from "@angular/core";
import { DOCUMENT } from '@angular/platform-browser';

import { AlertService, MessageSeverity, DialogType } from '../../services/alert.service';
import { AuthService } from "../../services/auth.service";
Severity: Minor
Found in src/ClientApp/app/components/user/login.page.ts - About 2 hrs to fix

    Function constructor has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        constructor(
            private alertService: AlertService,
            private authService: AuthService,
            private configurations: ConfigurationService,
            private translationService: AppTranslationService,
    Severity: Major
    Found in src/ClientApp/app/components/user/login.page.ts - About 2 hrs to fix

      Function login has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          login() {
              this.isLoading = true;
              this.alertService.startLoadingMessage("", this.translations.loggingIn);
      
              var password = this.wxCode ? `${this.code}|${this.wxCode}` : this.code;
      Severity: Minor
      Found in src/ClientApp/app/components/user/login.page.ts - About 1 hr to fix

        Function sendCode has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            sendCode() {
                if (this.remainSeconds > 0) return;
                this.startCountDown();
                this.authService.sendCode(this.phonenumber)
                    .subscribe(
        Severity: Minor
        Found in src/ClientApp/app/components/user/login.page.ts - About 1 hr to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                          if (Utilities.checkNoNetwork(error)) {
                              this.alertService.showStickyMessage(Utilities.noNetworkMessageCaption, Utilities.noNetworkMessageDetail, MessageSeverity.error, error);
                              // this.offerAlternateHost();
                          }
                          else {
          Severity: Major
          Found in src/ClientApp/app/components/user/login.page.ts and 1 other location - About 1 day to fix
          src/ClientApp/app/components/user/login.page.ts on lines 193..207

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 214.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                          if (Utilities.checkNoNetwork(error)) {
                              this.alertService.showStickyMessage(Utilities.noNetworkMessageCaption, Utilities.noNetworkMessageDetail, MessageSeverity.error, error);
                              // this.offerAlternateHost();
                          }
                          else {
          Severity: Major
          Found in src/ClientApp/app/components/user/login.page.ts and 1 other location - About 1 day to fix
          src/ClientApp/app/components/user/login.page.ts on lines 293..307

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 214.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

                                  this.alertService.showMessage(this.translations.loginTitle, this.translations.loginMessage({ name: user.nickName }), MessageSeverity.success);
          Severity: Major
          Found in src/ClientApp/app/components/user/login.page.ts and 2 other locations - About 50 mins to fix
          src/ClientApp/app/components/user/login.page.ts on lines 151..151
          src/ClientApp/app/components/user/login.page.ts on lines 280..280

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 51.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

                                          this.alertService.showMessage(this.translations.loginTitle, this.translations.loginMessage({ name: user.nickName }), MessageSeverity.success);
          Severity: Major
          Found in src/ClientApp/app/components/user/login.page.ts and 2 other locations - About 50 mins to fix
          src/ClientApp/app/components/user/login.page.ts on lines 276..276
          src/ClientApp/app/components/user/login.page.ts on lines 280..280

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 51.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

                                  this.alertService.showMessage(this.translations.sessionRestoreTitle, this.translations.sessionRestoreMessage({ name: user.nickName }), MessageSeverity.success);
          Severity: Major
          Found in src/ClientApp/app/components/user/login.page.ts and 2 other locations - About 50 mins to fix
          src/ClientApp/app/components/user/login.page.ts on lines 151..151
          src/ClientApp/app/components/user/login.page.ts on lines 276..276

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 51.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identifier 'errorMessage' is never reassigned; use 'const' instead of 'let'.
          Open

                              let errorMessage = Utilities.findHttpResponseMessage("error_description", error);

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.loginMessage = (params: Object) => gT("me.login.notification.LoginMessage", params);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.FailedToInitializeAccount = gT("me.login.error.FailedToInitializeAccount");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
          Open

                          this.wxPortrait = <string>params.get('portrait');

          Rule: no-angle-bracket-type-assertion

          Requires the use of as Type for type assertions instead of <Type>.

          Rationale

          Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

          Notes
          • TypeScript Only
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-angle-bracket-type-assertion": true

          For more information see this page.

          Forbidden 'var' keyword, use 'let' or 'const' instead
          Open

                  var password = this.wxCode ? `${this.code}|${this.wxCode}` : this.code;

          Rule: no-var-keyword

          Disallows usage of the var keyword.

          Use let or const instead.

          Rationale

          Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

          Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

          Notes
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-var-keyword": true

          For more information see this page.

          missing whitespace
          Open

                  this.loginRedirectUrl =this.authService.loginRedirectUrl;

          Rule: whitespace

          Enforces whitespace style conventions.

          Rationale

          Helps maintain a readable, consistent style in your codebase.

          Notes
          • Has Fix

          Config

          Several arguments may be optionally provided:

          • "check-branch" checks branching statements (if/else/for/while) are followed by whitespace.
          • "check-decl"checks that variable declarations have whitespace around the equals token.
          • "check-operator" checks for whitespace around operator tokens.
          • "check-module" checks for whitespace in import & export statements.
          • "check-separator" checks for whitespace after separator tokens (,/;).
          • "check-rest-spread" checks that there is no whitespace after rest/spread operator (...).
          • "check-type" checks for whitespace before a variable type specification.
          • "check-typecast" checks for whitespace between a typecast and its target.
          • "check-type-operator" checks for whitespace between type operators | and &.
          • "check-preblock" checks for whitespace before the opening brace of a block.
          • "check-postbrace" checks for whitespace after an opening brace.
          Examples
          "whitespace": true,check-branch,check-operator,check-typecast
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "check-branch",
                "check-decl",
                "check-operator",
                "check-module",
                "check-separator",
                "check-rest-spread",
                "check-type",
                "check-typecast",
                "check-type-operator",
                "check-preblock",
                "check-postbrace"
              ]
            },
            "minLength": 0,
            "maxLength": 11
          }

          For more information see this page.

          Don't use 'Object' as a type. Avoid using the Object type. Did you mean object?
          Open

                  this.translations.unableToLoginMessage = (params: Object) => gT("me.login.notification.UnableToLoginMessage", params);

          Rule: ban-types

          Bans specific types from being used. Does not ban the corresponding runtime objects from being used.

          Notes
          • TypeScript Only

          Config

          A list of ["regex", "optional explanation here"], which bans types that match regex

          Examples
          "ban-types": true,Object,Use {} instead.,String
          Schema
          {
            "type": "list",
            "listType": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minLength": 1,
              "maxLength": 2
            }
          }

          For more information see this page.

          Identifier 'gT' is never reassigned; use 'const' instead of 'let'.
          Open

                  let gT = (key: string, params?: Object) => translationService.getTranslation(key, params);

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          Identifier 'errorMessage' is never reassigned; use 'const' instead of 'let'.
          Open

                              let errorMessage = Utilities.findHttpResponseMessage("error_description", error);

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          == should be ===
          Open

                          this.wxBound = (params.get('bound') || "").toLowerCase() == "true";

          Rule: triple-equals

          Requires === and !== in place of == and !=.

          Config

          Two arguments may be optionally provided:

          • "allow-null-check" allows == and != when comparing to null.
          • "allow-undefined-check" allows == and != when comparing to undefined.
          Examples
          "triple-equals": true
          "triple-equals": true,allow-null-check
          "triple-equals": true,allow-undefined-check
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "allow-null-check",
                "allow-undefined-check"
              ]
            },
            "minLength": 0,
            "maxLength": 2
          }

          For more information see this page.

          " should be '
          Open

          import { AuthService } from "../../services/auth.service";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

          import { ActivatedRoute, ParamMap } from "@angular/router";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.IncorrectAccountPasswordCombination = gT("me.login.error.IncorrectAccountPasswordCombination");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Don't use 'Object' as a type. Avoid using the Object type. Did you mean object?
          Open

                  this.translations.sessionRestoreMessage = (params: Object) => gT("me.login.notification.SessionRestoreMessage", params);

          Rule: ban-types

          Bans specific types from being used. Does not ban the corresponding runtime objects from being used.

          Notes
          • TypeScript Only

          Config

          A list of ["regex", "optional explanation here"], which bans types that match regex

          Examples
          "ban-types": true,Object,Use {} instead.,String
          Schema
          {
            "type": "list",
            "listType": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minLength": 1,
              "maxLength": 2
            }
          }

          For more information see this page.

          unused expression, expected an assignment or function call
          Open

                              if (!errorCode && errorMessage) isDevMode() && console.warn(errorMessage);

          Rule: no-unused-expression

          Disallows unused expression statements.

          Unused expressions are expression statements which are not assignments or function calls (and thus usually no-ops).

          Rationale

          Detects potential errors where an assignment or function call was intended.

          Config

          Three arguments may be optionally provided:

          • allow-fast-null-checks allows to use logical operators to perform fast null checks and perform method or function calls for side effects (e.g. e && e.preventDefault()).
          • allow-new allows 'new' expressions for side effects (e.g. new ModifyGlobalState();.
          • allow-tagged-template allows tagged templates for side effects (e.g. this.add\foo`;`.
          Examples
          "no-unused-expression": true
          "no-unused-expression": true,allow-fast-null-checks
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "allow-fast-null-checks",
                "allow-new",
                "allow-tagged-template"
              ]
            },
            "minLength": 0,
            "maxLength": 3
          }

          For more information see this page.

          Identifier 'errorCode' is never reassigned; use 'const' instead of 'let'.
          Open

                              let errorCode = Utilities.findHttpResponseMessage("code", error);

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.GeneralError = gT("me.login.error.GeneralError");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.IncorrectPhoneNumberCodeCombination = gT("me.login.error.IncorrectPhoneNumberCodeCombination");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                              let errorCode = Utilities.findHttpResponseMessage("code", error);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.unableToSendCodeMessage = (params: Object) => gT("me.login.notification.UnableToSendCodeMessage", params);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Identifier 'baseUrl' is never reassigned; use 'const' instead of 'let'.
          Open

                  let baseUrl = this.configurations.siteUrl;

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

                      this.alertService.showDialog("服务器连接出现问题,是否要连接到开发用备用服务器?(测试使用)",

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Forbidden 'var' keyword, use 'let' or 'const' instead
          Open

                  var start = 60;

          Rule: no-var-keyword

          Disallows usage of the var keyword.

          Use let or const instead.

          Rationale

          Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

          Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

          Notes
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-var-keyword": true

          For more information see this page.

          Identifier 'returnUrl' is never reassigned; use 'const' instead of 'let'.
          Open

                  let returnUrl = `${baseUrl}/login` + (this.loginRedirectUrl == null ? '' : `?returnUrl=${this.loginRedirectUrl}`);

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

          import { AppTranslationService, LoadingMessage } from "../../services/app-translation.service";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

          import { WeixinService } from "../../services/weixin.service";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.unableToSendCodeTitle = gT("me.login.notification.UnableToSendCodeTitle");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.AccountSuspended = gT("me.login.error.AccountSuspended");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.AccountDisabled = gT("me.login.error.AccountDisabled");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.ExceedCodeIntervalLimit = gT("me.login.error.ExceedCodeIntervalLimit");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.OutdatedCode = gT("me.login.error.OutdatedCode");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                              let errorCode = Utilities.findHttpResponseMessage("code", error);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Identifier 'password' is never reassigned; use 'const' instead of 'var'.
          Open

                  var password = this.wxCode ? `${this.code}|${this.wxCode}` : this.code;

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

          import { Observable } from "rxjs/Observable";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.loggingIn = gT("me.login.notification.LoggingIn");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Don't use 'Object' as a type. Avoid using the Object type. Did you mean object?
          Open

                  let gT = (key: string, params?: Object) => translationService.getTranslation(key, params);

          Rule: ban-types

          Bans specific types from being used. Does not ban the corresponding runtime objects from being used.

          Notes
          • TypeScript Only

          Config

          A list of ["regex", "optional explanation here"], which bans types that match regex

          Examples
          "ban-types": true,Object,Use {} instead.,String
          Schema
          {
            "type": "list",
            "listType": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minLength": 1,
              "maxLength": 2
            }
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.sessionRestoreMessage = (params: Object) => gT("me.login.notification.SessionRestoreMessage", params);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.repeatLastOperationTitle = gT("me.login.notification.RepeatLastOperationTitle");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Don't use 'Object' as a type. Avoid using the Object type. Did you mean object?
          Open

                  this.translations.unableToSendCodeMessage = (params: Object) => gT("me.login.notification.UnableToSendCodeMessage", params);

          Rule: ban-types

          Bans specific types from being used. Does not ban the corresponding runtime objects from being used.

          Notes
          • TypeScript Only

          Config

          A list of ["regex", "optional explanation here"], which bans types that match regex

          Examples
          "ban-types": true,Object,Use {} instead.,String
          Schema
          {
            "type": "list",
            "listType": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minLength": 1,
              "maxLength": 2
            }
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.AccountNotAllowToLogin = gT("me.login.error.AccountNotAllowToLogin");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                              this.alertService.showStickyMessage("API地址修改了!", "目标API地址已成功修改为: " + value, MessageSeverity.warn);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Identifier 'redirectUrl' is never reassigned; use 'const' instead of 'let'.
          Open

                          let redirectUrl = <string>params.get('returnUrl');

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.sendCodeTitle = gT("me.login.notification.SendCodeTitle");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.PhoneNumberIsNotValid = gT("me.login.error.PhoneNumberIsNotValid");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                              let errorMessage = Utilities.findHttpResponseMessage("error_description", error);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Identifier 'start' is never reassigned; use 'const' instead of 'var'.
          Open

                  var start = 60;

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          Identifier 'rememberMe' is never reassigned; use 'const' instead of 'let'.
          Open

                  let rememberMe = this.wxCode ? true : this.rememberMe;

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          == should be ===
          Open

                  if (t == 1) return;

          Rule: triple-equals

          Requires === and !== in place of == and !=.

          Config

          Two arguments may be optionally provided:

          • "allow-null-check" allows == and != when comparing to null.
          • "allow-undefined-check" allows == and != when comparing to undefined.
          Examples
          "triple-equals": true
          "triple-equals": true,allow-null-check
          "triple-equals": true,allow-undefined-check
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "allow-null-check",
                "allow-undefined-check"
              ]
            },
            "minLength": 0,
            "maxLength": 2
          }

          For more information see this page.

          " should be '
          Open

          import { Component, OnInit, OnDestroy, Input, Inject, isDevMode } from "@angular/core";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

          import { IBusyConfig } from "angular2-busy";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.unableToLoginMessage = (params: Object) => gT("me.login.notification.UnableToLoginMessage", params);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
          Open

                          this.wxCode = <string>params.get('code');

          Rule: no-angle-bracket-type-assertion

          Requires the use of as Type for type assertions instead of <Type>.

          Rationale

          Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

          Notes
          • TypeScript Only
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-angle-bracket-type-assertion": true

          For more information see this page.

          " should be '
          Open

                  this.translations.sendCodeMessage = gT("me.login.notification.SendCodeMessage");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.ExceedCodeNumberLimit = gT("me.login.error.ExceedCodeNumberLimit");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Identifier 't' is never reassigned; use 'const' instead of 'let'.
          Open

                  let t = 1;

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          Identifier 'redirectUrl' is never reassigned; use 'const' instead of 'let'.
          Open

                  let redirectUrl = `${this.configurations.baseUrl}/wx/signin?returnUrl=${encodeURIComponent(returnUrl)}`

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

              code: string = "";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                              this.alertService.showStickyMessage("API地址修改了!", "目标API地址已成功修改为: " + value, MessageSeverity.warn);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
          Open

                          this.wxName = <string>params.get('name');

          Rule: no-angle-bracket-type-assertion

          Requires the use of as Type for type assertions instead of <Type>.

          Rationale

          Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

          Notes
          • TypeScript Only
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-angle-bracket-type-assertion": true

          For more information see this page.

          unused expression, expected an assignment or function call
          Open

                                          isDevMode() && console.warn(err);

          Rule: no-unused-expression

          Disallows unused expression statements.

          Unused expressions are expression statements which are not assignments or function calls (and thus usually no-ops).

          Rationale

          Detects potential errors where an assignment or function call was intended.

          Config

          Three arguments may be optionally provided:

          • allow-fast-null-checks allows to use logical operators to perform fast null checks and perform method or function calls for side effects (e.g. e && e.preventDefault()).
          • allow-new allows 'new' expressions for side effects (e.g. new ModifyGlobalState();.
          • allow-tagged-template allows tagged templates for side effects (e.g. this.add\foo`;`.
          Examples
          "no-unused-expression": true
          "no-unused-expression": true,allow-fast-null-checks
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "allow-fast-null-checks",
                "allow-new",
                "allow-tagged-template"
              ]
            },
            "minLength": 0,
            "maxLength": 3
          }

          For more information see this page.

          " should be '
          Open

              phonenumber: string = "";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.FailedToGenerateCode = gT("me.login.error.FailedToGenerateCode");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                          this.wxBound = (params.get('bound') || "").toLowerCase() == "true";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                                  this.alertService.startLoadingMessage("", this.translations.loggingIn);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                              let errorMessage = Utilities.findHttpResponseMessage("error_description", error);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
          Open

                          let redirectUrl = <string>params.get('returnUrl');

          Rule: no-angle-bracket-type-assertion

          Requires the use of as Type for type assertions instead of <Type>.

          Rationale

          Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

          Notes
          • TypeScript Only
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-angle-bracket-type-assertion": true

          For more information see this page.

          unused expression, expected an assignment or function call
          Open

                              if (!errorCode && errorMessage) isDevMode() && console.warn(errorMessage);

          Rule: no-unused-expression

          Disallows unused expression statements.

          Unused expressions are expression statements which are not assignments or function calls (and thus usually no-ops).

          Rationale

          Detects potential errors where an assignment or function call was intended.

          Config

          Three arguments may be optionally provided:

          • allow-fast-null-checks allows to use logical operators to perform fast null checks and perform method or function calls for side effects (e.g. e && e.preventDefault()).
          • allow-new allows 'new' expressions for side effects (e.g. new ModifyGlobalState();.
          • allow-tagged-template allows tagged templates for side effects (e.g. this.add\foo`;`.
          Examples
          "no-unused-expression": true
          "no-unused-expression": true,allow-fast-null-checks
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "allow-fast-null-checks",
                "allow-new",
                "allow-tagged-template"
              ]
            },
            "minLength": 0,
            "maxLength": 3
          }

          For more information see this page.

          Identifier 'errorCode' is never reassigned; use 'const' instead of 'let'.
          Open

                              let errorCode = Utilities.findHttpResponseMessage("code", error);

          Rule: prefer-const

          Requires that variable declarations use const instead of let and var if possible.

          If a variable is only assigned to once when it is declared, it should be declared using 'const'

          Notes
          • Has Fix

          Config

          An optional object containing the property "destructuring" with two possible values:

          • "any" (default) - If any variable in destructuring can be const, this rule warns for those variables.
          • "all" - Only warns if all variables in destructuring can be const.
          Examples
          "prefer-const": true
          "prefer-const": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "destructuring": {
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              }
            }
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.loginTitle = gT("me.login.notification.LoginTitle");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.sessionRestoreTitle = gT("me.login.notification.SessionRestoreTitle");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.RefreshTokenNotValid = gT("me.login.error.RefreshTokenNotValid");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.errorTranslations.FailedToSendCode = gT("me.login.error.FailedToSendCode");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.alertService.startLoadingMessage("", this.translations.loggingIn);

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          Missing semicolon
          Open

                  let redirectUrl = `${this.configurations.baseUrl}/wx/signin?returnUrl=${encodeURIComponent(returnUrl)}`

          Rule: semicolon

          Enforces consistent semicolon usage at the end of every statement.

          Notes
          • Has Fix

          Config

          One of the following arguments must be provided:

          • "always" enforces semicolons at the end of every statement.
          • "never" disallows semicolons at the end of every statement except for when they are necessary.

          The following arguments may be optionally provided:

          • "ignore-interfaces" skips checking semicolons at the end of interface members.
          • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
          • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
          Examples
          "semicolon": true,always
          "semicolon": true,never
          "semicolon": true,always,ignore-interfaces
          "semicolon": true,always,ignore-bound-class-methods
          Schema
          {
            "type": "array",
            "items": [
              {
                "type": "string",
                "enum": [
                  "always",
                  "never"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "ignore-interfaces"
                ]
              }
            ],
            "additionalItems": false
          }

          For more information see this page.

          Don't use 'Object' as a type. Avoid using the Object type. Did you mean object?
          Open

                  this.translations.loginMessage = (params: Object) => gT("me.login.notification.LoginMessage", params);

          Rule: ban-types

          Bans specific types from being used. Does not ban the corresponding runtime objects from being used.

          Notes
          • TypeScript Only

          Config

          A list of ["regex", "optional explanation here"], which bans types that match regex

          Examples
          "ban-types": true,Object,Use {} instead.,String
          Schema
          {
            "type": "list",
            "listType": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minLength": 1,
              "maxLength": 2
            }
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.repeatLastOperationMessage = gT("me.login.notification.RepeatLastOperationMessage");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                  this.translations.unableToLoginTitle = gT("me.login.notification.UnableToLoginTitle");

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          " should be '
          Open

                          this.wxBound = (params.get('bound') || "").toLowerCase() == "true";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

          • "single" enforces single quotes.
          • "double" enforces double quotes.
          • "backtick" enforces backticks.
          • "jsx-single" enforces single quotes for JSX attributes.
          • "jsx-double" enforces double quotes for JSX attributes.
          • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
          • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
          Examples
          "quotemark": true,single,avoid-escape,avoid-template
          "quotemark": true,single,jsx-double
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "backtick",
                "jsx-single",
                "jsx-double",
                "avoid-escape",
                "avoid-template"
              ]
            },
            "minLength": 0,
            "maxLength": 5
          }

          For more information see this page.

          There are no issues that match your filters.

          Category
          Status