noomorph/github-user-rank-extension

View on GitHub
src/content/utils/h.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export function render(element: any): any {
    if (typeof element === 'string' || typeof element === 'number') {
        return document.createTextNode(String(element));
    }

Severity: Minor
Found in src/content/utils/h.ts - About 35 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

Avoid too many return statements within this function.
Open

    return el;
Severity: Major
Found in src/content/utils/h.ts - About 30 mins to fix

    This overload and the one on line 11 can be combined into one signature taking string | {}.
    Open

    export function render(element: {}): Node;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: unified-signatures

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

    Notes
    • TypeScript Only

    Config

    Not configurable.

    Examples
    "unified-signatures": true

    For more information see this page.

    This overload and the one on line 13 can be combined into one signature taking {} | Node.
    Open

    export function render(element: Node): Node;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: unified-signatures

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

    Notes
    • TypeScript Only

    Config

    Not configurable.

    Examples
    "unified-signatures": true

    For more information see this page.

    This overload and the one on line 12 can be combined into one signature taking number | Node.
    Open

    export function render(element: Node): Node;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: unified-signatures

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

    Notes
    • TypeScript Only

    Config

    Not configurable.

    Examples
    "unified-signatures": true

    For more information see this page.

    space indentation expected
    Open

            children
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    This overload and the one on line 12 can be combined into one signature taking number | {}.
    Open

    export function render(element: {}): Node;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: unified-signatures

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

    Notes
    • TypeScript Only

    Config

    Not configurable.

    Examples
    "unified-signatures": true

    For more information see this page.

    space indentation expected
    Open

        return {
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        };
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    This overload and the one on line 11 can be combined into one signature taking string | number.
    Open

    export function render(element: number): Node;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: unified-signatures

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

    Notes
    • TypeScript Only

    Config

    Not configurable.

    Examples
    "unified-signatures": true

    For more information see this page.

    space indentation expected
    Open

            tag,
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            props,
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    This overload and the one on line 11 can be combined into one signature taking string | Node.
    Open

    export function render(element: Node): Node;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: unified-signatures

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

    Notes
    • TypeScript Only

    Config

    Not configurable.

    Examples
    "unified-signatures": true

    For more information see this page.

    space indentation expected
    Open

        if (Array.isArray(element)) {
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        }
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            return document.createTextNode(String(element));
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        if (!element || isNode(element)) {
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            return element.map(render);
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        if (typeof element.tag !== 'string') {
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        const children = wrapInArray(render(element.children));
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        return element && element instanceof Node;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        if (typeof element === 'string' || typeof element === 'number') {
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

                return false;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            }
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        }
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        const el = document.createElement(tag);
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        }).forEach(childEl => el.appendChild(childEl));
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        }
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        const {tag, props} = element;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            return element;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        return el;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        return Array.isArray(value) ? value : [value];
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            if (!isNode(node)) {
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        Object.assign(el, props);
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            return null;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

                console.log('weird child node in', tag, '\n', node, children);
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

            return true;
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        }
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    space indentation expected
    Open

        children.filter(node => {
    Severity: Minor
    Found in src/content/utils/h.ts by tslint

    Rule: indent

    Enforces indentation with tabs or spaces.

    Rationale

    Using only one of tabs or spaces for indentation leads to more consistent editor behavior, cleaner diffs in version control, and easier programmatic manipulation.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • spaces enforces consistent spaces.
    • tabs enforces consistent tabs.

    A second optional argument specifies indentation size:

    • 2 enforces 2 space indentation.
    • 4 enforces 4 space indentation.

    Indentation size is required for auto-fixing, but not for rule checking.

    NOTE: auto-fixing will only convert invalid indent whitespace to the desired type, it will not fix invalid whitespace sizes.

    Examples
    "indent": true,spaces
    "indent": true,spaces,4
    "indent": true,tabs,2
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "tabs",
            "spaces"
          ]
        },
        {
          "type": "number",
          "enum": [
            2,
            4
          ]
        }
      ],
      "minLength": 0,
      "maxLength": 5
    }

    For more information see this page.

    There are no issues that match your filters.

    Category
    Status