uchaindb/UClient

View on GitHub
src/ClientApp/app/services/utilities.ts

Summary

Maintainability
D
2 days
Test Coverage

File utilities.ts has 348 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Injectable, isDevMode } from '@angular/core';
import { Response } from '@angular/http';
import { Lightbox } from "angular2-lightbox";
import { AlertService, MessageSeverity } from './alert.service';
import { PaginationType } from '../models/pager.model';
Severity: Minor
Found in src/ClientApp/app/services/utilities.ts - About 4 hrs to fix

    Utilities has 27 functions (exceeds 20 allowed). Consider refactoring.
    Open

    @Injectable()
    export class Utilities {
    
        public static readonly captionAndMessageSeparator = ":";
        public static readonly noNetworkMessageCaption = "无网络";
    Severity: Minor
    Found in src/ClientApp/app/services/utilities.ts - About 3 hrs to fix

      Function getHttpResponseMessage has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

          public static getHttpResponseMessage(data: Response | any): string[] {
      
              let responses: string[] = [];
      
              if (data instanceof Response) {
      Severity: Minor
      Found in src/ClientApp/app/services/utilities.ts - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function findHttpResponseMessage has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public static findHttpResponseMessage(messageToFind: string, data: Response | any, seachInCaptionOnly = true, includeCaptionInResult = false): string {
      
              let searchString = messageToFind.toLowerCase();
              let httpMessages = this.getHttpResponseMessage(data);
      
      
      Severity: Minor
      Found in src/ClientApp/app/services/utilities.ts - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function getPager has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static getPager(totalItems: number, currentPage: number = 1, pageSize: number = 10): PaginationType {
              // calculate total pages
              let totalPages = Math.ceil(totalItems / pageSize);
      
              let startPage: number, endPage: number;
      Severity: Minor
      Found in src/ClientApp/app/services/utilities.ts - About 1 hr to fix

        Function printDuration has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            public static printDuration(start: Date, end: Date) {
        
                start = new Date(start);
                end = new Date(end);
        
        
        Severity: Minor
        Found in src/ClientApp/app/services/utilities.ts - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function parseDate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            public static parseDate(date) {
        
                if (date) {
        
                    if (date instanceof Date) {
        Severity: Minor
        Found in src/ClientApp/app/services/utilities.ts - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

            public static getHttpResponseMessage(data: Response | any): string[] {
        
                let responses: string[] = [];
        
                if (data instanceof Response) {
        Severity: Minor
        Found in src/ClientApp/app/services/utilities.ts - About 1 hr to fix

          Function removeNulls has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public static removeNulls(obj) {
                  let isArray = obj instanceof Array;
          
                  for (let k in obj) {
                      if (obj[k] === null) {
          Severity: Minor
          Found in src/ClientApp/app/services/utilities.ts - About 55 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function standardErrorProcess has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public static standardErrorProcess(error: any, alertService: AlertService, title: string, message: string, errorTranslations: { [index: string]: string }): void {
                  if (Utilities.checkNoNetwork(error)) {
                      alertService.showStickyMessage(Utilities.noNetworkMessageCaption, Utilities.noNetworkMessageDetail, MessageSeverity.error, error);
                  }
                  else {
          Severity: Minor
          Found in src/ClientApp/app/services/utilities.ts - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function safeStringify has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public static safeStringify(object) {
          
                  let result: string;
          
                  try {
          Severity: Minor
          Found in src/ClientApp/app/services/utilities.ts - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function getPager has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public static getPager(totalItems: number, currentPage: number = 1, pageSize: number = 10): PaginationType {
                  // calculate total pages
                  let totalPages = Math.ceil(totalItems / pageSize);
          
                  let startPage: number, endPage: number;
          Severity: Minor
          Found in src/ClientApp/app/services/utilities.ts - About 25 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

                                  let fullMessage = Utilities.splitInTwo(message, this.captionAndMessageSeparator);

          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 'dateString' is never reassigned; use 'const' instead of 'let'.
          Open

                  let dateString = dayNames[dayOfWeek] + ", " + dayOfMonth + sup + " " + monthNames[month] + " " + year;

          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 'isArray' is never reassigned; use 'const' instead of 'let'.
          Open

                  let isArray = obj instanceof Array;

          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 { Lightbox } from "angular2-lightbox";

          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 dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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 timeout;

          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.

          " should be '
          Open

                  let dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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.

          Expected property shorthand in object literal ('{currentPage}').
          Open

                      currentPage: currentPage,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

          " should be '
          Open

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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 'message' is never reassigned; use 'const' instead of 'let'.
          Open

                  for (let message of httpMessages) {

          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

                  let sup = "";

          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 'pages' is never reassigned; use 'const' instead of 'let'.
          Open

                  let pages = range(startPage, endPage + 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.

          " should be '
          Open

                      sup = "st";

          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

                  if (hour == 0) {

          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

                      sup = "nd";

          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

                      if (isArray && obj.length == k) {

          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

                      sup = "th";

          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

              public static readonly noNetworkMessageCaption = "无网络";

          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 monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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

                      minute = "0" + minute;

          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.

          Expected property shorthand in object literal ('{totalPages}').
          Open

                      totalPages: totalPages,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

          " should be '
          Open

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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 'key' is never reassigned; use 'const' instead of 'let'.
          Open

                              for (let key in responseObject) {

          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 'dayOfMonth' is never reassigned; use 'const' instead of 'let'.
          Open

                  let dayOfMonth = date.getDate();

          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

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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 'callNow' is never reassigned; use 'const' instead of 'var'.
          Open

                      var callNow = immediate && !timeout;

          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

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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

                      return response.status == 404;

          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

                  let dateString = dayNames[dayOfWeek] + ", " + dayOfMonth + sup + " " + monthNames[month] + " " + year;

          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 dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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 period = "";

          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 dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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

                      sup = "rd";

          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 printedDays = "";

          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

                  return Utilities.printDateOnly(date) + " at " + Utilities.printTimeOnly(date);

          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.

          block is empty
          Open

                  catch (error) {
          
                  }

          Rule: no-empty

          Disallows empty blocks.

          Blocks with a comment inside are not considered empty.

          Rationale

          Empty blocks are often indicators of missing code.

          Config

          If allow-empty-catch is specified, then catch blocks are allowed to be empty. If allow-empty-functions is specified, then function definitions are allowed to be empty.

          Examples
          "no-empty": true
          "no-empty": true,allow-empty-catch
          "no-empty": true,allow-empty-functions
          "no-empty": true,allow-empty-catch,allow-empty-functions
          Schema
          {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "allow-empty-catch"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "allow-empty-functions"
                  ]
                }
              ]
            }
          }

          For more information see this page.

          Expected property shorthand in object literal ('{pageSize}').
          Open

                      pageSize: pageSize,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

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

                              let responseObject = data.json();

          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 'simpleObject' is never reassigned; use 'const' instead of 'let'.
          Open

                  let simpleObject = {};

          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

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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 dateString = dayNames[dayOfWeek] + ", " + dayOfMonth + sup + " " + monthNames[month] + " " + year;

          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.

          Expected property shorthand in object literal ('{startIndex}').
          Open

                      startIndex: startIndex,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

          non-arrow functions are forbidden
          Open

                      var later = function () {

          Rule: only-arrow-functions

          Disallows traditional (non-arrow) function expressions.

          Note that non-arrow functions are allowed if 'this' appears somewhere in its body (as such functions cannot be converted to arrow functions).

          Rationale

          Traditional functions don't bind lexical scope, which can lead to unexpected behavior when accessing 'this'.

          Config

          Two arguments may be optionally provided:

          • "allow-declarations" allows standalone function declarations.
          • "allow-named-functions" allows the expression function foo() {} but not function() {}.
          Examples
          "only-arrow-functions": true
          "only-arrow-functions": true,allow-declarations,allow-named-functions
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "allow-declarations",
                "allow-named-functions"
              ]
            },
            "minLength": 0,
            "maxLength": 1
          }

          For more information see this page.

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

                  let year = date.getFullYear();

          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 'endIndex' is never reassigned; use 'const' instead of 'let'.
          Open

                  let endIndex = Math.min(startIndex + pageSize - 1, totalItems - 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.

          " should be '
          Open

                      return location.hostname === "localhost" || location.hostname === "127.0.0.1";

          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

                      if (!errorCode && errorMessage) isDevMode() && console.warn("no error code error message: ", errorMessage);

          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.

          comment must start with a space
          Open

                  //return value === undefined;

          Rule: comment-format

          Enforces formatting rules for single-line comments.

          Rationale

          Helps maintain a consistent, readable style in your codebase.

          Notes
          • Has Fix

          Config

          Four arguments may be optionally provided:

          • "check-space" requires that all single-line comments must begin with a space, as in // comment
            • note that for comments starting with multiple slashes, e.g. ///, leading slashes are ignored
            • TypeScript reference comments are ignored completely
          • "check-lowercase" requires that the first non-whitespace character of a comment must be lowercase, if applicable.
          • "check-uppercase" requires that the first non-whitespace character of a comment must be uppercase, if applicable.
          • "allow-trailing-lowercase" allows that only the first comment of a series of comments needs to be uppercase.
            • requires "check-uppercase"
            • comments must start at the same position

          Exceptions to "check-lowercase" or "check-uppercase" can be managed with object that may be passed as last argument.

          One of two options can be provided in this object:

          • "ignore-words" - array of strings - words that will be ignored at the beginning of the comment.
          • "ignore-pattern" - string - RegExp pattern that will be ignored at the beginning of the comment.
          Examples
          "comment-format": true,check-space,check-uppercase,allow-trailing-lowercase
          "comment-format": true,check-lowercase,[object Object]
          "comment-format": true,check-lowercase,[object Object]
          Schema
          {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "check-space",
                    "check-lowercase",
                    "check-uppercase",
                    "allow-trailing-lowercase"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "ignore-words": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "ignore-pattern": {
                      "type": "string"
                    }
                  },
                  "minProperties": 1,
                  "maxProperties": 1
                }
              ]
            },
            "minLength": 1,
            "maxLength": 5
          }

          For more information see this page.

          unused expression, expected an assignment or function call
          Open

                      if (!errorCode && errorMessage) isDevMode() && console.warn("no error code error message: ", 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 'responses' is never reassigned; use 'const' instead of 'let'.
          Open

                  let responses: string[] = [];

          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 'loweredRoles' is never reassigned; use 'const' instead of 'let'.
          Open

                      let loweredRoles: string[] = [];

          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 'monthNames' is never reassigned; use 'const' instead of 'let'.
          Open

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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 'k' is never reassigned; use 'const' instead of 'let'.
          Open

                  for (let k in obj) {

          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 'index' is never reassigned; use 'const' instead of 'let'.
          Open

                  let index = allImg.indexOf(img);

          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 (typeof (object[prop]) == 'function') {

          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

                      otherDate.getMonth() == birthDate.getMonth() && otherDate.getDate() < birthDate.getDate()) {

          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

                      return location.hostname === "localhost" || location.hostname === "127.0.0.1";

          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 dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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("reason", 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.

          Unnecessary semicolon
          Open

              };

          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.

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

                      var args_ = arguments;

          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.

          Expected property shorthand in object literal ('{totalItems}').
          Open

                      totalItems: totalItems,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

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

                      let fullMessage = Utilities.splitInTwo(message, this.captionAndMessageSeparator);

          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 'httpMessages' is never reassigned; use 'const' instead of 'let'.
          Open

                  let httpMessages = this.getHttpResponseMessage(data);

          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 'totalPages' is never reassigned; use 'const' instead of 'let'.
          Open

                  let totalPages = Math.ceil(totalItems / pageSize);

          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 (message.toLowerCase().indexOf(searchString) != -1) {

          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

                  else if (dayOfMonth == 3 || dayOfMonth == 23) {

          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.

          Assigning this reference to local variable not allowed: context.
          Open

                      var context = this;

          Rule: no-this-assignment

          Disallows unnecessary references to this.

          Rationale

          Assigning a variable to this instead of properly using arrow lambdas may be a symptom of pre-ES6 practices or not managing scope well.

          Instead of storing a reference to this and using it inside a function () {:

          const self = this;
          
          setTimeout(function () {
              self.doWork();
          });

          Use () => arrow lambdas, as they preserve this scope for you:

          setTimeout(() => {
              this.doWork();
          });

          Config

          Two options may be provided on an object:

          • allow-destructuring allows using destructuring to access members of this (e.g. { foo, bar } = this;).
          • allowed-names may be specified as a list of regular expressions to match allowed variable names.
          Examples
          "no-this-assignment": true
          "no-this-assignment": true,[object Object]
          Schema
          {
            "additionalProperties": false,
            "properties": {
              "allow-destructuring": {
                "type": "boolean"
              },
              "allowed-names": {
                "listType": "string",
                "type": "list"
              }
            },
            "type": "object"
          }

          For more information see this page.

          " should be '
          Open

              public static readonly captionAndMessageSeparator = ":";

          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

              public static readonly noNetworkMessageDetail = "无法连接服务器";

          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 dateString = dayNames[dayOfWeek] + ", " + dayOfMonth + sup + " " + monthNames[month] + " " + year;

          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 context = this;

          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.

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

                      var later = function () {

          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 'seconds' is never reassigned; use 'const' instead of 'let'.
          Open

                  let seconds = delta % 60;  // in theory the modulus is not required

          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

                  else if (dayOfMonth == 2 || dayOfMonth == 22) {

          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

                      else if (typeof obj[k] == "object") {

          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

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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 monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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

                  period = hour < 12 ? "AM" : "PM";

          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

                  period = hour < 12 ? "AM" : "PM";

          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 'message' is never reassigned; use 'const' instead of 'let'.
          Open

                      for (let message of httpMessages) {

          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 'prop' is never reassigned; use 'const' instead of 'let'.
          Open

                  for (let prop in object) {

          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 'startIndex' is never reassigned; use 'const' instead of 'let'.
          Open

                  let startIndex = (currentPage - 1) * pageSize;

          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 (fullMessage.firstPart && fullMessage.firstPart.toLowerCase().indexOf(searchString) != -1) {

          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

                  if (dayOfMonth == 1 || dayOfMonth == 21 || dayOfMonth == 31) {

          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

                  else if (dayOfMonth == 2 || dayOfMonth == 22) {

          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

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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

              public static toLowerCase(items: string)

          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.

          block is empty
          Open

                          catch (error) {
                          }

          Rule: no-empty

          Disallows empty blocks.

          Blocks with a comment inside are not considered empty.

          Rationale

          Empty blocks are often indicators of missing code.

          Config

          If allow-empty-catch is specified, then catch blocks are allowed to be empty. If allow-empty-functions is specified, then function definitions are allowed to be empty.

          Examples
          "no-empty": true
          "no-empty": true,allow-empty-catch
          "no-empty": true,allow-empty-functions
          "no-empty": true,allow-empty-catch,allow-empty-functions
          Schema
          {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "allow-empty-catch"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "allow-empty-functions"
                  ]
                }
              ]
            }
          }

          For more information see this page.

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

                          return new Date(<any>date);

          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.

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

                  let hours = Math.floor(delta / 3600) % 24;

          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.

          Expected property shorthand in object literal ('{endPage}').
          Open

                      endPage: endPage,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

          == should be ===
          Open

                      return response.status == 0;

          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.

          Multiple variable declarations in the same statement are forbidden
          Open

                  let startPage: number, endPage: number;

          Rule: one-variable-per-declaration

          Disallows multiple variable definitions in the same declaration statement.

          Config

          One argument may be optionally provided:

          • ignore-for-loop allows multiple variable definitions in a for loop declaration.
          Examples
          "one-variable-per-declaration": true
          "one-variable-per-declaration": true,ignore-for-loop
          Schema
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ignore-for-loop"
              ]
            },
            "minLength": 0,
            "maxLength": 1
          }

          For more information see this page.

          == should be ===
          Open

                      return response.status == 403;

          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.

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

                  let searchString = messageToFind.toLowerCase();

          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

                  else if (dayOfMonth == 3 || dayOfMonth == 23) {

          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.

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

                  let month = date.getMonth();

          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

                  let dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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 'days' is never reassigned; use 'const' instead of 'let'.
          Open

                  let days = Math.floor(delta / 86400);

          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.

          Missing semicolon
          Open

              public static toLowerCase(items: string[])

          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.

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

                      var args_ = arguments;

          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("reason", 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.

          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

                  if (separatorIndex == -1)

          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.

          These overloads can be combined into one signature taking string | string[].
          Open

              public static toLowerCase(items: string[])

          Rule: unified-signatures

          Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter.

          Notes
          • TypeScript Only

          Config

          Not configurable.

          Examples
          "unified-signatures": true

          For more information see this page.

          " should be '
          Open

                  result = "[***Sanitized Object***]: " + JSON.stringify(simpleObject);

          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

                      printedDays = "0";

          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 'separatorIndex' is never reassigned; use 'const' instead of 'let'.
          Open

                  let separatorIndex = text.indexOf(separator);

          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.

          for (... in ...) statements must be filtered with an if statement
          Open

                  for (let k in obj) {
                      if (obj[k] === null) {
                          isArray ? obj.splice(k, 1) : delete obj[k];
                      }
                      else if (typeof obj[k] == "object") {

          Rule: forin

          Requires a for ... in statement to be filtered with an if statement.

          Rationale
          for (let key in someObject) {
              if (someObject.hasOwnProperty(key)) {
                  // code here
              }
          }

          Prevents accidental iteration over properties inherited from an object's prototype. See MDN's for...in documentation for more information about for...in loops.

          Also consider using a Map or Set if you're storing collections of objects. Using Objects can cause occasional edge case bugs, such as if a key is named "hasOwnProperty".

          Config

          Not configurable.

          Examples
          "forin": true

          For more information see this page.

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

                  let dayOfWeek = date.getDay();

          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 'part2' is never reassigned; use 'const' instead of 'let'.
          Open

                  let part2 = text.substr(separatorIndex + 1).trim();

          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 'timeString' is never reassigned; use 'const' instead of 'let'.
          Open

                  let timeString = hour + ":" + minute + " " + period;

          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.

          Expected property shorthand in object literal ('{pages}').
          Open

                      pages: pages

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

          == should be ===
          Open

                      if (typeof (object[prop]) == 'object') {

          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

                      if (value === "undefined")

          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 'part1' is never reassigned; use 'const' instead of 'let'.
          Open

                  let part1 = text.substr(0, separatorIndex).trim();

          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 (date.search(/[a-su-z+]/i) == -1)

          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

                  let dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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 timeString = hour + ":" + minute + " " + period;

          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 timeString = hour + ":" + minute + " " + period;

          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 'dayNames' is never reassigned; use 'const' instead of 'let'.
          Open

                  let dayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

          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

                      else if (typeof obj[k] == "object") {

          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 'range' is never reassigned; use 'const' instead of 'let'.
          Open

                  let range = (start, end) => Array.from({ length: (end - start) }, (v, k) => k + start);

          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

              public static readonly accessDeniedMessageCaption = "访问被拒绝";

          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

                  if (dayOfMonth == 1 || dayOfMonth == 21 || dayOfMonth == 31) {

          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

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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.

          Expected property shorthand in object literal ('{startPage}').
          Open

                      startPage: startPage,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

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

                      let location = new URL(url, base);

          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 'minutes' is never reassigned; use 'const' instead of 'let'.
          Open

                  let minutes = Math.floor(delta / 60) % 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 'context' is never reassigned; use 'const' instead of 'var'.
          Open

                      var context = this;

          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 'albums' is never reassigned; use 'const' instead of 'let'.
          Open

                  let albums = allImg.map(_ => ({ src: _, caption: null, thumb: null, }));

          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 (dayOfMonth == 1 || dayOfMonth == 21 || dayOfMonth == 31) {

          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

                  if (minute.length == 1) {

          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

              public static readonly accessDeniedMessageDetail = "";

          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 monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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.

          Array type using 'Array<t>' is forbidden. Use 'T[]' instead.</t>
          Open

              public static openImage(allImg: Array<string>, img: string, lightbox: Lightbox): void {

          Rule: array-type

          Requires using either 'T[]' or 'Array<t>' for arrays.</t>

          Notes
          • TypeScript Only
          • Has Fix

          Config

          One of the following arguments must be provided:

          • "array" enforces use of T[] for all types T.
          • "generic" enforces use of Array<T> for all types T.
          • "array-simple" enforces use of T[] if T is a simple type (primitive or type reference).
          Examples
          "array-type": true,array
          "array-type": true,generic
          "array-type": true,array-simple
          Schema
          {
            "type": "string",
            "enum": [
              "array",
              "generic",
              "array-simple"
            ]
          }

          For more information see this page.

          " should be '
          Open

                  let monthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

          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 callNow = immediate && !timeout;

          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.

          " should be '
          Open

                              date = date + "Z";

          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.

          Expected property shorthand in object literal ('{endIndex}').
          Open

                      endIndex: endIndex,

          Rule: object-literal-shorthand

          Enforces/disallows use of ES6 object literal shorthand.

          Notes
          • Has Fix

          Config

          "always" assumed to be default option, thus with no options provided the rule enforces object literal methods and properties shorthands. With "never" option provided, any shorthand object literal syntax causes an error.

          The rule can be configured in a more granular way. With {"property": "never"} provided (which is equivalent to {"property": "never", "method": "always"}), the rule only flags property shorthand assignments, and respectively with {"method": "never"} (equivalent to {"property": "always", "method": "never"}), the rule fails only on method shorthands.

          Examples
          "object-literal-shorthand": true
          "object-literal-shorthand": true,never
          "object-literal-shorthand": true,[object Object]
          Schema
          {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "never"
                    ]
                  }
                },
                "minProperties": 1,
                "maxProperties": 2
              }
            ]
          }

          For more information see this page.

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

                      var later = function () {

          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

                      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.

          There are no issues that match your filters.

          Category
          Status