toggle-corp/react-rest-request

View on GitHub
src/RestRequest.ts

Summary

Maintainability
A
1 hr
Test Coverage

Avoid too many return statements within this function.
Open

            return;
Severity: Major
Found in src/RestRequest.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return;
    Severity: Major
    Found in src/RestRequest.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return;
      Severity: Major
      Found in src/RestRequest.ts - About 30 mins to fix

        Missing trailing comma
        Open

                        `Max retries exceeded: ${urlValue}`, parameters
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        Rule: trailing-comma

        Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

        Notes
        • Has Fix

        Config

        One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

        The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

        • "multiline" checks multi-line object literals.
        • "singleline" checks single-line object literals.

        An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

        To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

        Examples
        "trailing-comma": true,[object Object]
        "trailing-comma": true,[object Object]
        Schema
        {
          "type": "object",
          "properties": {
            "multiline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "singleline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "esSpecCompliant": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }

        For more information see this page.

        Missing trailing comma
        Open

                        `No success callback defined: ${urlValue}`, parameters
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        Rule: trailing-comma

        Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

        Notes
        • Has Fix

        Config

        One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

        The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

        • "multiline" checks multi-line object literals.
        • "singleline" checks single-line object literals.

        An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

        To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

        Examples
        "trailing-comma": true,[object Object]
        "trailing-comma": true,[object Object]
        Schema
        {
          "type": "object",
          "properties": {
            "multiline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "singleline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "esSpecCompliant": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }

        For more information see this page.

        Missing semicolon
        Open

                    ])
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        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 trailing comma
        Open

                        `No failure callback defined: ${urlValue}`, parameters
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        Rule: trailing-comma

        Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

        Notes
        • Has Fix

        Config

        One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

        The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

        • "multiline" checks multi-line object literals.
        • "singleline" checks single-line object literals.

        An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

        To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

        Examples
        "trailing-comma": true,[object Object]
        "trailing-comma": true,[object Object]
        Schema
        {
          "type": "object",
          "properties": {
            "multiline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "singleline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "esSpecCompliant": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }

        For more information see this page.

        Missing trailing comma
        Open

                        `No fatal callback defined: ${urlValue}`, parameters
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        Rule: trailing-comma

        Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

        Notes
        • Has Fix

        Config

        One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

        The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

        • "multiline" checks multi-line object literals.
        • "singleline" checks single-line object literals.

        An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

        To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

        Examples
        "trailing-comma": true,[object Object]
        "trailing-comma": true,[object Object]
        Schema
        {
          "type": "object",
          "properties": {
            "multiline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "singleline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "esSpecCompliant": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }

        For more information see this page.

        Missing semicolon
        Open

                    ])
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        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

                })
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        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 trailing comma
        Open

                        `Trying to start aborted request: ${urlValue}`, parameters
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        Rule: trailing-comma

        Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

        Notes
        • Has Fix

        Config

        One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

        The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

        • "multiline" checks multi-line object literals.
        • "singleline" checks single-line object literals.

        An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

        To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

        Examples
        "trailing-comma": true,[object Object]
        "trailing-comma": true,[object Object]
        Schema
        {
          "type": "object",
          "properties": {
            "multiline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "singleline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "esSpecCompliant": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }

        For more information see this page.

        Missing trailing comma
        Open

                        `Max polls exceeded: ${urlValue}`, parameters
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        Rule: trailing-comma

        Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

        Notes
        • Has Fix

        Config

        One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

        The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

        • "multiline" checks multi-line object literals.
        • "singleline" checks single-line object literals.

        An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

        To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

        Examples
        "trailing-comma": true,[object Object]
        "trailing-comma": true,[object Object]
        Schema
        {
          "type": "object",
          "properties": {
            "multiline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "singleline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "esSpecCompliant": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }

        For more information see this page.

        Missing trailing comma
        Open

                        `Trying to start running request: ${urlValue}`, parameters
        Severity: Minor
        Found in src/RestRequest.ts by tslint

        Rule: trailing-comma

        Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

        Notes
        • Has Fix

        Config

        One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

        The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

        • "multiline" checks multi-line object literals.
        • "singleline" checks single-line object literals.

        An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

        To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

        Examples
        "trailing-comma": true,[object Object]
        "trailing-comma": true,[object Object]
        Schema
        {
          "type": "object",
          "properties": {
            "multiline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "singleline": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "always",
                    "never"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "arrays": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "exports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "functions": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "imports": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "objects": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    },
                    "typeLiterals": {
                      "type": "string",
                      "enum": [
                        "always",
                        "never",
                        "ignore"
                      ]
                    }
                  }
                }
              ]
            },
            "esSpecCompliant": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }

        For more information see this page.

        There are no issues that match your filters.

        Category
        Status