uchaindb/UClient

View on GitHub
src/ClientApp/app/services/chain-db.service.ts

Summary

Maintainability
F
5 days
Test Coverage

File chain-db.service.ts has 334 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Injectable, Injector } from '@angular/core';
import { Observable } from "rxjs/Observable";
import 'rxjs/add/observable/of';
import { ConfigurationService } from "./configuration.service";
import { EndpointFactory } from "./endpoint-factory.service";
Severity: Minor
Found in src/ClientApp/app/services/chain-db.service.ts - About 4 hrs to fix

    ChainDbService has 26 functions (exceeds 20 allowed). Consider refactoring.
    Open

    @Injectable()
    export class ChainDbService extends EndpointFactory {
        private readonly _baseUrl: string = "";
        get baseUrl() { return this.configurations.baseUrl + this._baseUrl; }
    
    
    Severity: Minor
    Found in src/ClientApp/app/services/chain-db.service.ts - About 3 hrs to fix

      Function getChainDbTable has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          getChainDbTable(db: ChainDb, tableName: string, start: number = 0, size: number = 100): Observable<QueryTableResponse> {
              return this.rpcCall(db.address, "QueryData", [tableName, start, size, "", ""]).
                  map((_: QueryDataRpcResponse) => {
                      let dataHist = _.DataHistories || [];
                      let pkname = _.PrimaryKeyName;
      Severity: Minor
      Found in src/ClientApp/app/services/chain-db.service.ts - About 1 hr to fix

        Function getQueryCell has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            getQueryCell(db: ChainDb, tableName: string, primaryKeyValue: string, columnName: string, columns: string[]): Observable<QueryCellResponse> {
                if (!db) throw 'db not exist calling getQueryCell';
                columns = columns || [];
                return this.rpcCall(db.address, "QueryCell", [tableName, primaryKeyValue, columnName, ...columns])
                    .map((_: QueryCellRpcResponse) => {
        Severity: Minor
        Found in src/ClientApp/app/services/chain-db.service.ts - About 1 hr to fix

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

              private getLockTxHashContent(initiator: Address, witness: string, lockScripts: string, targets: Array<LockTarget>, unlockScripts: string = null): string {
                  let mapColumns = (columns: Array<LockTarget>): Array<string> =>
                      columns.map(_ => `[${_.TargetType}][${_.PublicPermission}]${(!_.TableName ? '' : _.TableName)}:${(!_.PrimaryKey ? '' : _.PrimaryKey)}:${(!_.ColumnName ? '' : _.ColumnName)}`);
                  let unlockContent = unlockScripts ? unlockScripts + "|" : "";
                  return `${unlockContent}${initiator.toB58String()}|${witness}|${lockScripts ? lockScripts : ''}|${mapColumns(targets).join(",")}`
          Severity: Minor
          Found in src/ClientApp/app/services/chain-db.service.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 getSchemaTxHashContent has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              private getSchemaTxHashContent(initiator: Address, witness: string, actions: Array<SchemaAction>, unlockScripts: string = null): string {
                  let mapColumns = (columns: Array<SchemaColumnDefinition>): Array<string> =>
                      !columns ? []
                          : columns.map(_ => `${(_.PrimaryKey ? '[P]' : '')}${_.Name}:${_.Type}`);
                  let acts = actions
          Severity: Minor
          Found in src/ClientApp/app/services/chain-db.service.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

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

              createDataTx(db: ChainDb, privateKey: PrivateKey, unlockPrivateKey: PrivateKey, actions: Array<DataAction>): Observable<CreateTxRpcResponse> {
                  let pubKey = this.cryptoService.getPublicKey(privateKey);
                  let initiator = pubKey.toAddress();
          
                  return this.getChainDbStatus(db)
          Severity: Major
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 1 day to fix
          src/ClientApp/app/services/chain-db.service.ts on lines 235..248

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 238.

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

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

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

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

          Refactorings

          Further Reading

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

              createSchemaTx(db: ChainDb, privateKey: PrivateKey, unlockPrivateKey: PrivateKey, actions: Array<SchemaAction>): Observable<CreateTxRpcResponse> {
                  let pubKey = this.cryptoService.getPublicKey(privateKey);
                  let initiator = pubKey.toAddress();
          
                  return this.getChainDbStatus(db)
          Severity: Major
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 1 day to fix
          src/ClientApp/app/services/chain-db.service.ts on lines 220..233

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 238.

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

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

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

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

          Refactorings

          Further Reading

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

              private generateUnlockScriptsForDataTx(privateKey: PrivateKey, initiator: Address, witness: string, actions: Array<DataAction>): string {
                  if (!privateKey) return null;
                  let hashContent = this.getDataTxHashContent(initiator, witness, actions);
                  return this.generateUnlockScriptsForTx(privateKey, hashContent);
              }
          Severity: Major
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 2 hrs to fix
          src/ClientApp/app/services/chain-db.service.ts on lines 271..275

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 82.

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

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

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

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

          Refactorings

          Further Reading

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

              private generateUnlockScriptsForSchemaTx(privateKey: PrivateKey, initiator: Address, witness: string, actions: Array<SchemaAction>): string {
                  if (!privateKey) return null;
                  let hashContent = this.getSchemaTxHashContent(initiator, witness, actions);
                  return this.generateUnlockScriptsForTx(privateKey, hashContent);
              }
          Severity: Major
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 2 hrs to fix
          src/ClientApp/app/services/chain-db.service.ts on lines 265..269

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 82.

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

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

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

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

          Refactorings

          Further Reading

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

              constructor(
                  http: Http,
                  configurations: ConfigurationService,
                  injector: Injector,
                  private localStoreManager: LocalStoreManager,
          Severity: Major
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 1 hr to fix
          src/ClientApp/app/services/private-key.service.ts on lines 19..28

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 65.

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

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

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

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

          Refactorings

          Further Reading

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

                  if (!this.localStoreManager.exists(ChainDbService.DBKEY_CHAIN_DB_DATA)) {
                      this.localStoreManager.savePermanentData([], ChainDbService.DBKEY_CHAIN_DB_DATA);
                  }
          Severity: Minor
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 35 mins to fix
          src/ClientApp/app/services/notification.service.ts on lines 32..34

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 46.

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

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

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

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

          Refactorings

          Further Reading

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

              getChainDbStatus(db: ChainDb): Observable<StatusRpcResponse> {
                  return this.rpcCall(db.address, "Status", []);
              }
          Severity: Minor
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 30 mins to fix
          src/ClientApp/app/services/chain-db.service.ts on lines 119..121

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

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

              getChainDbTableNames(db: ChainDb): Observable<ListTablesRpcResponse> {
                  return this.rpcCall(db.address, "ListTables", []);
              }
          Severity: Minor
          Found in src/ClientApp/app/services/chain-db.service.ts and 1 other location - About 30 mins to fix
          src/ClientApp/app/services/chain-db.service.ts on lines 98..100

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 45.

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

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

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

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

          Refactorings

          Further Reading

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

              createDataTx(db: ChainDb, privateKey: PrivateKey, unlockPrivateKey: PrivateKey, actions: Array<DataAction>): Observable<CreateTxRpcResponse> {

          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.

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

              createSchemaTx(db: ChainDb, privateKey: PrivateKey, unlockPrivateKey: PrivateKey, actions: Array<SchemaAction>): Observable<CreateTxRpcResponse> {

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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 cdb = dblist && dblist.find(_ => _.id == dbid);

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

                          let pkidx = headers.findIndex(_ => _ == pkname);

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

                          let rows: Array<RowDef> = [];

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

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

                              let hist = datahist[i];

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

                          let data = _.Row;

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

                          let rows = [row];

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

                          let hashContent = this.getSchemaTxHashContent(initiator, witness, actions, unlockScripts);

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

                  let pubKey = this.cryptoService.getPublicKey(privateKey);

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

                  let signature = this.cryptoService.sign(tosign, privateKey);

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

                  let sigarr = new Uint8Array(64);

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

                  let unlockContent = unlockScripts ? unlockScripts + "|" : "";

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

                  let acts = actions

          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 { Router } from "@angular/router";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

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

          For more information see this page.

          " should be '
          Open

                          address: "http://localhost:7847/api/rpc",

          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

                          name: "XXXX捐赠数据",

          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 unlockContent = unlockScripts ? unlockScripts + "|" : "";

          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

              getDbList(pager?: Pager): Observable<Array<ChainDb>> {

          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.

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

              private generateUnlockScriptsForDataTx(privateKey: PrivateKey, initiator: Address, witness: string, actions: Array<DataAction>): string {

          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.

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

                  let mapColumns = (columns: Array<SchemaColumnDefinition>): Array<string> =>

          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.

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

                  let mapColumns = (columns: Array<LockTarget>): Array<string> =>

          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.

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

                                      pkval: pkval,

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

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

                          let colCount = headers.length;

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

                          let rowCount = data.length / colCount;

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

                          let columns = row.map(r => ({ name: r.name, tran: null, history: 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.

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

                  let hashContent = this.getDataTxHashContent(initiator, witness, actions);

          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 whitespace
          Open

                      id: 1,//(new Date).getTime(),

          Rule: whitespace

          Enforces whitespace style conventions.

          Rationale

          Helps maintain a readable, consistent style in your codebase.

          Notes
          • Has Fix

          Config

          Several arguments may be optionally provided:

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

          For more information see this page.

          " should be '
          Open

                  return this.rpcCall(db.address, "QueryData", [tableName, start, size, "", ""]).

          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 (!data || !datahist) throw "unexpected data";

          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 this.rpcCall(db.address, "CreateSchemaTx", [initiator.toB58String(), sig, witness, unlockScripts, ...as]);

          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 unlockContent = unlockScripts ? unlockScripts + "|" : "";

          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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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.

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

                  let mapColumns = (columns: Array<ColumnData>): Array<string> =>

          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.

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

              private getSchemaTxHashContent(initiator: Address, witness: string, actions: Array<SchemaAction>, unlockScripts: string = null): string {

          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.

          comment must start with a space
          Open

                      id: 1,//(new Date).getTime(),

          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.

          Shadowed name: '_'
          Open

                              .map(_ => new Tx({ Hash: _ }));

          Rule: no-shadowed-variable

          Disallows shadowing variable declarations.

          Rationale

          When a variable in a local scope and a variable in the containing scope have the same name, shadowing occurs. Shadowing makes it impossible to access the variable in the containing scope and obscures to what value an identifier actually refers. Compare the following snippets:

          const a = 'no shadow';
          function print() {
              console.log(a);
          }
          print(); // logs 'no shadow'.
          const a = 'no shadow';
          function print() {
              const a = 'shadow'; // TSLint will complain here.
              console.log(a);
          }
          print(); // logs 'shadow'.

          ESLint has an equivalent rule. For more background information, refer to this MDN closure doc.

          Config

          You can optionally pass an object to disable checking for certain kinds of declarations. Possible keys are "class", "enum", "function", "import", "interface", "namespace", "typeAlias" and "typeParameter". You can also pass "underscore" to ignore variable names that begin with _. Just set the value to false for the check you want to disable. All checks default to true, i.e. are enabled by default. Note that you cannot disable variables and parameters.

          The option "temporalDeadZone" defaults to true which shows errors when shadowing block scoped declarations in their temporal dead zone. When set to false parameters, classes, enums and variables declared with let or const are not considered shadowed if the shadowing occurs within their temporal dead zone.

          The following example shows how the "temporalDeadZone" option changes the linting result:

          function fn(value) {
              if (value) {
                  const tmp = value; // no error on this line if "temporalDeadZone" is false
                  return tmp;
              }
              let tmp = undefined;
              if (!value) {
                  const tmp = value; // this line always contains an error
                  return tmp;
              }
          }
          Examples
          "no-shadowed-variable": true
          "no-shadowed-variable": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "class": {
                "type": "boolean"
              },
              "enum": {
                "type": "boolean"
              },
              "function": {
                "type": "boolean"
              },
              "import": {
                "type": "boolean"
              },
              "interface": {
                "type": "boolean"
              },
              "namespace": {
                "type": "boolean"
              },
              "typeAlias": {
                "type": "boolean"
              },
              "typeParameter": {
                "type": "boolean"
              },
              "temporalDeadZone": {
                "type": "boolean"
              },
              "underscore": {
                "type": "boolean"
              }
            }
          }

          For more information see this page.

          Throwing plain strings (not instances of Error) gives no stack traces
          Open

                  if (!db) throw 'db not exist calling removeChainDb';

          Rule: no-string-throw

          Flags throwing plain strings or concatenations of strings.

          Rationale

          Example – Doing it right

          // throwing an Error from typical function, whether sync or async
          if (!productToAdd) {
              throw new Error("How can I add new product when no value provided?");
          }

          Example – Anti Pattern

          // throwing a string lacks any stack trace information and other important data properties
          if (!productToAdd) {
              throw ("How can I add new product when no value provided?");
          }

          Only Error objects contain a .stack member equivalent to the current stack trace. Primitives such as strings do not.

          Notes
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-string-throw": true

          For more information see this page.

          Throwing plain strings (not instances of Error) gives no stack traces
          Open

                          if (!data || !datahist) throw "unexpected data";

          Rule: no-string-throw

          Flags throwing plain strings or concatenations of strings.

          Rationale

          Example – Doing it right

          // throwing an Error from typical function, whether sync or async
          if (!productToAdd) {
              throw new Error("How can I add new product when no value provided?");
          }

          Example – Anti Pattern

          // throwing a string lacks any stack trace information and other important data properties
          if (!productToAdd) {
              throw ("How can I add new product when no value provided?");
          }

          Only Error objects contain a .stack member equivalent to the current stack trace. Primitives such as strings do not.

          Notes
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-string-throw": true

          For more information see this page.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

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

                  var dblist: Array<ChainDb> = [

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

                  let hashContent = this.getSchemaTxHashContent(initiator, witness, actions);

          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

                              case "InsertDataAction":

          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 unlockContent = unlockScripts ? unlockScripts + "|" : "";

          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 `${unlockContent}${initiator.toB58String()}|${witness}|${lockScripts ? lockScripts : ''}|${mapColumns(targets).join(",")}`

          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

                  return `${unlockContent}${initiator.toB58String()}|${witness}|${lockScripts ? lockScripts : ''}|${mapColumns(targets).join(",")}`

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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.

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

              rpcCall(url: string, method: ChainDbRpcMethod, params: Array<string | number>): Observable<any> {

          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.

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

              private generateUnlockScriptsForLockTx(privateKey: PrivateKey, initiator: Address, witness: string, lockScripts: string, targets: Array<LockTarget>): string {

          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.

          Shadowed name: 'columns'
          Open

                          let columns = row.map(r => ({ name: r.name, tran: null, history: null }));

          Rule: no-shadowed-variable

          Disallows shadowing variable declarations.

          Rationale

          When a variable in a local scope and a variable in the containing scope have the same name, shadowing occurs. Shadowing makes it impossible to access the variable in the containing scope and obscures to what value an identifier actually refers. Compare the following snippets:

          const a = 'no shadow';
          function print() {
              console.log(a);
          }
          print(); // logs 'no shadow'.
          const a = 'no shadow';
          function print() {
              const a = 'shadow'; // TSLint will complain here.
              console.log(a);
          }
          print(); // logs 'shadow'.

          ESLint has an equivalent rule. For more background information, refer to this MDN closure doc.

          Config

          You can optionally pass an object to disable checking for certain kinds of declarations. Possible keys are "class", "enum", "function", "import", "interface", "namespace", "typeAlias" and "typeParameter". You can also pass "underscore" to ignore variable names that begin with _. Just set the value to false for the check you want to disable. All checks default to true, i.e. are enabled by default. Note that you cannot disable variables and parameters.

          The option "temporalDeadZone" defaults to true which shows errors when shadowing block scoped declarations in their temporal dead zone. When set to false parameters, classes, enums and variables declared with let or const are not considered shadowed if the shadowing occurs within their temporal dead zone.

          The following example shows how the "temporalDeadZone" option changes the linting result:

          function fn(value) {
              if (value) {
                  const tmp = value; // no error on this line if "temporalDeadZone" is false
                  return tmp;
              }
              let tmp = undefined;
              if (!value) {
                  const tmp = value; // this line always contains an error
                  return tmp;
              }
          }
          Examples
          "no-shadowed-variable": true
          "no-shadowed-variable": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "class": {
                "type": "boolean"
              },
              "enum": {
                "type": "boolean"
              },
              "function": {
                "type": "boolean"
              },
              "import": {
                "type": "boolean"
              },
              "interface": {
                "type": "boolean"
              },
              "namespace": {
                "type": "boolean"
              },
              "typeAlias": {
                "type": "boolean"
              },
              "typeParameter": {
                "type": "boolean"
              },
              "temporalDeadZone": {
                "type": "boolean"
              },
              "underscore": {
                "type": "boolean"
              }
            }
          }

          For more information see this page.

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

              private getLockTxHashContent(initiator: Address, witness: string, lockScripts: string, targets: Array<LockTarget>, unlockScripts: string = null): string {

          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.

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

                  let mapColumns = (columns: Array<LockTarget>): Array<string> =>

          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.

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

                                  rows: rows,

          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.

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

                                  pkname: pkname,

          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.

          comment must start with a space
          Open

                                  //history: hist && hist.HistoryLength,

          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.

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

                  let endpointUrl = `${this.baseUrl}/database.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.

          Shadowed name: '_'
          Open

                          let pkidx = headers.findIndex(_ => _ == pkname);

          Rule: no-shadowed-variable

          Disallows shadowing variable declarations.

          Rationale

          When a variable in a local scope and a variable in the containing scope have the same name, shadowing occurs. Shadowing makes it impossible to access the variable in the containing scope and obscures to what value an identifier actually refers. Compare the following snippets:

          const a = 'no shadow';
          function print() {
              console.log(a);
          }
          print(); // logs 'no shadow'.
          const a = 'no shadow';
          function print() {
              const a = 'shadow'; // TSLint will complain here.
              console.log(a);
          }
          print(); // logs 'shadow'.

          ESLint has an equivalent rule. For more background information, refer to this MDN closure doc.

          Config

          You can optionally pass an object to disable checking for certain kinds of declarations. Possible keys are "class", "enum", "function", "import", "interface", "namespace", "typeAlias" and "typeParameter". You can also pass "underscore" to ignore variable names that begin with _. Just set the value to false for the check you want to disable. All checks default to true, i.e. are enabled by default. Note that you cannot disable variables and parameters.

          The option "temporalDeadZone" defaults to true which shows errors when shadowing block scoped declarations in their temporal dead zone. When set to false parameters, classes, enums and variables declared with let or const are not considered shadowed if the shadowing occurs within their temporal dead zone.

          The following example shows how the "temporalDeadZone" option changes the linting result:

          function fn(value) {
              if (value) {
                  const tmp = value; // no error on this line if "temporalDeadZone" is false
                  return tmp;
              }
              let tmp = undefined;
              if (!value) {
                  const tmp = value; // this line always contains an error
                  return tmp;
              }
          }
          Examples
          "no-shadowed-variable": true
          "no-shadowed-variable": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "class": {
                "type": "boolean"
              },
              "enum": {
                "type": "boolean"
              },
              "function": {
                "type": "boolean"
              },
              "import": {
                "type": "boolean"
              },
              "interface": {
                "type": "boolean"
              },
              "namespace": {
                "type": "boolean"
              },
              "typeAlias": {
                "type": "boolean"
              },
              "typeParameter": {
                "type": "boolean"
              },
              "temporalDeadZone": {
                "type": "boolean"
              },
              "underscore": {
                "type": "boolean"
              }
            }
          }

          For more information see this page.

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

                          let dataHist = _.DataHistories || [];

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

                                  let hist = dataHist[i * colCount + j];

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

                          let colCount = headers.length;

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

                  let pubKey = this.cryptoService.getPublicKey(privateKey);

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

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

                          let hashContent = this.getLockTxHashContent(initiator, witness, lockScripts, targets, unlockScripts);

          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 ('{pkval}').
          Open

                                  pkval: pkval,

          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

              private readonly _baseUrl: string = "";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

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

          For more information see this page.

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

                  let initiator = pubKey.toAddress();

          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 ('{tableName}').
          Open

                                  tableName: tableName,

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

                  let sig = B58.toB58(sigarr);

          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

                          address: "http://localhost:7848/api/rpc",

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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

                          image: "https://placeimg.com/100/100/any",

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

                  let mapColumns = (columns: Array<SchemaColumnDefinition>): Array<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.

          " should be '
          Open

                  return this.rpcCall(db.address, "QueryChain", [mixId]);

          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 pkidx = headers.findIndex(_ => _ == pkname);

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

                  let initiator = pubKey.toAddress();

          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

                              case "DeleteDataAction":

          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 this.rpcCall(db.address, "Status", []);

          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 (idx == -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

                                  return `[${_.Name}]DropColumns:${(_.DropColumns || []).join(",")};AddOrModifyColumns:${mapColumns(_.AddOrModifyColumns).join(",")}`;

          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

                              case "UpdateDataAction":

          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 this.rpcCall(db.address, "ListTables", []);

          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 `[${_.SchemaName}]Update[${_.PrimaryKeyValue}]:${mapColumns(_.Columns).join(",")}`;

          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 unlockContent = unlockScripts ? unlockScripts + "|" : "";

          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 `[${_.Name}]CreateColumns:${mapColumns(_.Columns).join(",")}`;

          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 `[${_.Name}]DropColumns:${(_.DropColumns || []).join(",")};AddOrModifyColumns:${mapColumns(_.AddOrModifyColumns).join(",")}`;

          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 `${unlockContent}${initiator.toB58String()}|${witness}|${acts.join(",")}`

          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

                          }

          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.

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

                  let mapColumns = (columns: Array<ColumnData>): Array<string> =>

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA);

          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 ncdb = cdblist.find(_ => _.id == dbid);

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_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 'pkval' is never reassigned; use 'const' instead of 'let'.
          Open

                                  let pkval = data[i * colCount + pkidx];

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

                              let row: RowDef = [];

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

                          let row: RowDef = [];

          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

                          description: "由。。。运营,保存有从xxx开始的数据,为实时数据,接受大众监督。由。。。运营,保存有从xxx开始的数据,为实时数据,接受大众监督。由。。。运营,保存有从xxx开始的数据,为实时数据,接受大众监督。",

          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 unlockContent = unlockScripts ? unlockScripts + "|" : "";

          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

                              errorMessage += " " + decodedResponse.error.message;

          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

                          }

          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.

          Missing semicolon
          Open

                  return `${unlockContent}${initiator.toB58String()}|${witness}|${acts.join(",")}`

          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.

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

                          let rows: Array<RowDef> = [];

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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.

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

                          let columns: Array<ColumnDef> = [];

          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.

          Shadowed name: '_'
          Open

                          let pkidx = headers.findIndex(_ => _ == pkname);

          Rule: no-shadowed-variable

          Disallows shadowing variable declarations.

          Rationale

          When a variable in a local scope and a variable in the containing scope have the same name, shadowing occurs. Shadowing makes it impossible to access the variable in the containing scope and obscures to what value an identifier actually refers. Compare the following snippets:

          const a = 'no shadow';
          function print() {
              console.log(a);
          }
          print(); // logs 'no shadow'.
          const a = 'no shadow';
          function print() {
              const a = 'shadow'; // TSLint will complain here.
              console.log(a);
          }
          print(); // logs 'shadow'.

          ESLint has an equivalent rule. For more background information, refer to this MDN closure doc.

          Config

          You can optionally pass an object to disable checking for certain kinds of declarations. Possible keys are "class", "enum", "function", "import", "interface", "namespace", "typeAlias" and "typeParameter". You can also pass "underscore" to ignore variable names that begin with _. Just set the value to false for the check you want to disable. All checks default to true, i.e. are enabled by default. Note that you cannot disable variables and parameters.

          The option "temporalDeadZone" defaults to true which shows errors when shadowing block scoped declarations in their temporal dead zone. When set to false parameters, classes, enums and variables declared with let or const are not considered shadowed if the shadowing occurs within their temporal dead zone.

          The following example shows how the "temporalDeadZone" option changes the linting result:

          function fn(value) {
              if (value) {
                  const tmp = value; // no error on this line if "temporalDeadZone" is false
                  return tmp;
              }
              let tmp = undefined;
              if (!value) {
                  const tmp = value; // this line always contains an error
                  return tmp;
              }
          }
          Examples
          "no-shadowed-variable": true
          "no-shadowed-variable": true,[object Object]
          Schema
          {
            "type": "object",
            "properties": {
              "class": {
                "type": "boolean"
              },
              "enum": {
                "type": "boolean"
              },
              "function": {
                "type": "boolean"
              },
              "import": {
                "type": "boolean"
              },
              "interface": {
                "type": "boolean"
              },
              "namespace": {
                "type": "boolean"
              },
              "typeAlias": {
                "type": "boolean"
              },
              "typeParameter": {
                "type": "boolean"
              },
              "temporalDeadZone": {
                "type": "boolean"
              },
              "underscore": {
                "type": "boolean"
              }
            }
          }

          For more information see this page.

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

                          let datahist = _.RowHistories;

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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 ('{rows}').
          Open

                                  rows: rows,

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

                          let as = targets.map(_ => JSON.stringify(_));

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

                          var ncdb = cdblist.find(_ => _.id == dbid);

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

                  let unlockContent = unlockScripts ? unlockScripts + "|" : "";

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

                  var cdb = dblist && dblist.find(_ => _.id == dbid);

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

                  let mapColumns = (columns: Array<LockTarget>): Array<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 'headers' is never reassigned; use 'const' instead of 'let'.
          Open

                          let headers = _.Headers;

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

                  let unlockContent = unlockScripts ? unlockScripts + "|" : "";

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

                          let witness = result.Tail.Hash;

          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

                  var idx = dblist.findIndex(_ => _.id == dbid);

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

                  let hashContent = this.getLockTxHashContent(initiator, witness, lockScripts, targets);

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

                  let requestString = JSON.stringify(jsonParams);

          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

                      console.warn("setDbEditMode failed due to cannot find dbid");

          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

                  var cdb = dblist && dblist.find(_ => _.id == dbid);

          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

                          id: "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 pkidx = headers.findIndex(_ => _ == pkname);

          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

                          id: "2",

          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 this.rpcCall(db.address, "QueryData", [tableName, start, size, "", ""]).

          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 ('{pkname}').
          Open

                                  pkname: pkname,

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

                  var idx = dblist.findIndex(_ => _.id == dbid);

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

                          let pkidx = headers.findIndex(_ => _ == pkname);

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

                          let pkval = data[pkidx];

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

                          let witness = result.Tail.Hash;

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

                          let as = actions.map(_ => JSON.stringify(_));

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

                          let witness = result.Tail.Hash;

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

                  let tosign = this.cryptoService.hash(hashContent);

          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 { Http, Headers, Response, RequestOptions } from "@angular/http";

          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

                          image: "https://placeimg.com/200/200/any",

          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 this.rpcCall(db.address, "QueryData", [tableName, start, size, "", ""]).

          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 unlockContent = unlockScripts ? unlockScripts + "|" : "";

          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.

          Throwing plain strings (not instances of Error) gives no stack traces
          Open

                  if (!db) throw 'db not exist calling getQueryCell';

          Rule: no-string-throw

          Flags throwing plain strings or concatenations of strings.

          Rationale

          Example – Doing it right

          // throwing an Error from typical function, whether sync or async
          if (!productToAdd) {
              throw new Error("How can I add new product when no value provided?");
          }

          Example – Anti Pattern

          // throwing a string lacks any stack trace information and other important data properties
          if (!productToAdd) {
              throw ("How can I add new product when no value provided?");
          }

          Only Error objects contain a .stack member equivalent to the current stack trace. Primitives such as strings do not.

          Notes
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-string-throw": true

          For more information see this page.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

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

                          let as = actions.map(_ => JSON.stringify(_));

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

                  let pubKey = this.cryptoService.getPublicKey(privateKey);

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

                          let unlockScripts = this.generateUnlockScriptsForLockTx(unlockPrivateKey, initiator, witness, lockScripts, targets);

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

                  let acts = actions

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

                  let jsonParams = {

          Rule: prefer-const

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

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

          Notes
          • Has Fix

          Config

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

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

          For more information see this page.

          " should be '
          Open

          import { Observable } from "rxjs/Observable";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

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

          For more information see this page.

          " should be '
          Open

                          return this.rpcCall(db.address, "CreateLockTx", [initiator.toB58String(), sig, witness, unlockScripts, lockScripts, ...as]);

          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 `${unlockContent}${initiator.toB58String()}|${witness}|${acts.join(",")}`

          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

                              //let hist = allHist[colHist[i]];

          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.

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

                          let pkname = _.PrimaryKeyName;

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

                          let unlockScripts = this.generateUnlockScriptsForDataTx(unlockPrivateKey, initiator, witness, actions);

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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.

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

              getRecommendDbList(pager?: Pager): Observable<Array<ChainDb>> {

          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

                      .findIndex(_ => _.id == db.id);

          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.

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

                                  columns: columns,

          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.

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

                  var dblist: Array<ChainDb> = [

          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

                          var ncdb = cdblist.find(_ => _.id == dbid);

          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.

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

                                  tableName: tableName,

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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.

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

              private generateUnlockScriptsForSchemaTx(privateKey: PrivateKey, initiator: Address, witness: string, actions: Array<SchemaAction>): string {

          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.

          Throwing plain strings (not instances of Error) gives no stack traces
          Open

                  if (!db) throw 'db not exist calling addChainDb';

          Rule: no-string-throw

          Flags throwing plain strings or concatenations of strings.

          Rationale

          Example – Doing it right

          // throwing an Error from typical function, whether sync or async
          if (!productToAdd) {
              throw new Error("How can I add new product when no value provided?");
          }

          Example – Anti Pattern

          // throwing a string lacks any stack trace information and other important data properties
          if (!productToAdd) {
              throw ("How can I add new product when no value provided?");
          }

          Only Error objects contain a .stack member equivalent to the current stack trace. Primitives such as strings do not.

          Notes
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-string-throw": true

          For more information see this page.

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

                              txs: txs,

          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.

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

                  let mapColumns = (columns: Array<SchemaColumnDefinition>): Array<string> =>

          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.

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

                      method: method,

          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.

          Throwing plain strings (not instances of Error) gives no stack traces
          Open

                  if (!db) throw 'db not exist calling getQueryChain';

          Rule: no-string-throw

          Flags throwing plain strings or concatenations of strings.

          Rationale

          Example – Doing it right

          // throwing an Error from typical function, whether sync or async
          if (!productToAdd) {
              throw new Error("How can I add new product when no value provided?");
          }

          Example – Anti Pattern

          // throwing a string lacks any stack trace information and other important data properties
          if (!productToAdd) {
              throw ("How can I add new product when no value provided?");
          }

          Only Error objects contain a .stack member equivalent to the current stack trace. Primitives such as strings do not.

          Notes
          • Has Fix

          Config

          Not configurable.

          Examples
          "no-string-throw": true

          For more information see this page.

          comment must start with a space
          Open

                                  //tran: hist && hist.TxHash,

          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.

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

                  var dblist = this.localStoreManager.getData(ChainDbService.DBKEY_CHAIN_DB_DATA) as Array<ChainDb>;

          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 ('{columns}').
          Open

                                  columns: columns,

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

                  var idx = dblist

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

                          let headers = _.Headers;

          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.

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

                          let columns: Array<ColumnDef> = [];

          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.

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

                          let txs = (_.Txs || [])

          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 ('{params}').
          Open

                      params: params

          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.

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

              createLockTx(db: ChainDb, privateKey: PrivateKey, unlockPrivateKey: PrivateKey, lockScripts: string, targets: Array<LockTarget>): Observable<CreateTxRpcResponse> {

          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.

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

                          let pkname = _.PrimaryKeyName;

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

                  let initiator = pubKey.toAddress();

          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.

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

              private getDataTxHashContent(initiator: Address, witness: string, actions: Array<DataAction>, unlockScripts: string = null): string {

          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

          import { ConfigurationService } from "./configuration.service";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

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

          For more information see this page.

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

                          let sig = this.signTx(privateKey, hashContent);

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

                          let hashContent = this.getDataTxHashContent(initiator, witness, actions, unlockScripts);

          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.

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

                  var idx = dblist.findIndex(_ => _.id == dbid);

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

                          let unlockScripts = this.generateUnlockScriptsForSchemaTx(unlockPrivateKey, initiator, witness, actions);

          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

                  return `${unlockContent}${initiator.toB58String()}|${witness}|${acts.join(",")}`

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

                  let mapColumns = (columns: Array<ColumnData>): Array<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.

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

                  var dblist: Array<ChainDb> = [

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

                          let sig = this.signTx(privateKey, hashContent);

          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.

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

                  var idx = dblist

          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

          import { Pager } from "../models/pager.model";

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

                          let sig = this.signTx(privateKey, hashContent);

          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

                          description: "由。。。运营,保存有从xxx开始的数据,为实时数据,接受大众监督。由。。。运营,保存有从xxx开始的数据,为实时数据,接受大众监督。由。。。运营,保存有从xxx开始的数据,为实时数据,接受大众监督。",

          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 this.rpcCall(db.address, "QueryCell", [tableName, primaryKeyValue, columnName, ...columns])

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

                  let signature = this.cryptoService.sign(hashContent, privateKey);

          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 (dblist.findIndex(_ => _.id == db.id) > -1) return Observable.of(false);

          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 this.rpcCall(db.address, "CreateDataTx", [initiator.toB58String(), sig, witness, unlockScripts, ...as]);

          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

                              case "ModifySchemaAction":

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

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

          For more information see this page.

          " should be '
          Open

          import { EndpointFactory } from "./endpoint-factory.service";

          Rule: quotemark

          Enforces quote character for string literals.

          Notes
          • Has Fix

          Config

          Five arguments may be optionally provided:

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

          For more information see this page.

          " should be '
          Open

              public static readonly DBKEY_CHAIN_DB_DATA = "chain_db";

          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

                          name: "备份灯火计划捐赠数据",

          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

                              case "DropSchemaAction":

          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 `[${_.SchemaName}]Insert:${mapColumns(_.Columns).join(",")}`;

          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

                              case "CreateSchemaAction":

          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