namtran3005/zeromq-broker

View on GitHub
src/Broker.ts

Summary

Maintainability
D
2 days
Test Coverage

File Broker.ts has 281 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import MongoSMQ from "mongo-message";
import * as winston from "winston";
import * as zeromq from "zeromq";
import Client from "./Client";

Severity: Minor
Found in src/Broker.ts - About 2 hrs to fix

    Function initBroker has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      public async initBroker() {
        await this.initQueue();
        if (this.nextDest) {
          this.deliver = await new Client({
            queueUrl: this.nextDest,
    Severity: Minor
    Found in src/Broker.ts - About 1 hr to fix

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

        public async registerNextDest() {
          const sendNextAndAck = async () => {
            const doneTask = await this.queueInst.Message.find(this.doneDef);
            winston.debug("Deliver retrived a done work with info %j\n", doneTask[0]);
            if (doneTask && doneTask.length !== 0) {
      Severity: Minor
      Found in src/Broker.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

      Consider simplifying this complex logical expression.
      Open

          if (payload &&
              payload._id && typeof payload._id === "string" &&
              payload.tries && typeof payload.tries === "number" &&
              payload.message && payload.message.result
          ) {
      Severity: Major
      Found in src/Broker.ts - About 1 hr to fix

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

            this.backend.on("message", (...reqMsg) => {
              const [reqAddress, delimiter, payload] = reqMsg;
              const parsed = JSON.parse(payload.toString());
              winston.debug("Backend received payload with info\n", {
                delimiter: delimiter.toString(),
        Severity: Major
        Found in src/Broker.ts and 1 other location - About 5 hrs to fix
        src/Broker.ts on lines 131..141

        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 139.

        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

            this.frontend.on("message", (...reqMsg) => {
              const [reqAddress, delimiter, payload] = reqMsg;
              const parsed = JSON.parse(payload.toString());
              winston.debug("Frontend received task with info\n", {
                delimiter: delimiter.toString(),
        Severity: Major
        Found in src/Broker.ts and 1 other location - About 5 hrs to fix
        src/Broker.ts on lines 142..152

        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 139.

        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

            winston.debug("%j", {
              clientAddress: (respAddress && (typeof respAddress === "object")) ? respAddress.toString("hex") : respAddress,
              delimiter: (delimiter && (typeof delimiter === "object")) ? delimiter.toString() : delimiter,
              payload,
            });
        Severity: Major
        Found in src/Broker.ts and 1 other location - About 2 hrs to fix
        src/ClientAck.ts on lines 77..81

        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 75.

        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

          public _increaseTask(): void {
            const after = this.numTask + 1;
            winston.debug(` increaseTask \n %j`, {
              after,
              before: this.numTask,
        Severity: Major
        Found in src/Broker.ts and 1 other location - About 1 hr to fix
        src/Broker.ts on lines 187..194

        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 70.

        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

          public _decreaseTask(): void {
            const after = this.numTask - 1;
            winston.debug(` decreaseTask \n %j`, {
              after,
              before: this.numTask,
        Severity: Major
        Found in src/Broker.ts and 1 other location - About 1 hr to fix
        src/Broker.ts on lines 178..185

        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 70.

        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

            onUpdateMsg: (payload: any) => {
              query: { _id: string, tries: number},
              update: any,
            } | void;
        Severity: Minor
        Found in src/Broker.ts and 1 other location - About 35 mins to fix
        src/Broker.ts on lines 27..30

        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 47.

        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

          public onUpdateMsg: (payload: any) => {
            query: { _id: string, tries: number},
            update: any,
          } | void;
        Severity: Minor
        Found in src/Broker.ts and 1 other location - About 35 mins to fix
        src/Broker.ts on lines 45..48

        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 47.

        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

        variable name clashes with keyword/type
        Open

          public onBackReq: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

          public onBackReq: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onFrontReq: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

          public onBackResp: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

          public onFrontResp: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

          public onFrontResp: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onBackResp: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onBackReq: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

          public onFrontReq: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onFrontResp: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onFrontReq: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onFrontResp: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onBackResp: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

            onBackReq: (any, any) => any,
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

          public onFrontReq: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        variable name clashes with keyword/type
        Open

          public onBackResp: (any, any) => any;
        Severity: Minor
        Found in src/Broker.ts by tslint

        Rule: variable-name

        Checks variable names for various errors.

        Config

        Several arguments may be optionally provided:

        • "check-format" enbables enforcement of a certain naming format. By default, the rule only allows only lowerCamelCased or UPPER_CASED variable names.
          • These additional options make the check stricter:
          • "require-const-for-all-caps": enforces that all variables with UPPER_CASED names should be const.
          • These additional options make the check more permissive:
          • "allow-leading-underscore" allows underscores at the beginning (only has an effect if "check-format" specified)
          • "allow-pascal-case" allows PascalCase in addition to lowerCamelCase.
          • "allow-snake-case" allows snake_case in addition to lowerCamelCase.
          • "allow-trailing-underscore" allows underscores at the end. (only has an effect if "check-format" specified)
        • "ban-keywords": disallows the use of certain TypeScript keywords as variable or parameter names.
          • These are: any, Number, number, String, string, Boolean, boolean, Undefined, undefined
        Examples
        "variable-name": [object Object]
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "check-format",
              "allow-leading-underscore",
              "allow-pascal-case",
              "allow-snake-case",
              "allow-trailing-underscore",
              "require-const-for-all-caps",
              "ban-keywords"
            ]
          },
          "minLength": 0,
          "maxLength": 6
        }

        For more information see this page.

        There are no issues that match your filters.

        Category
        Status