ssube/js-utils

View on GitHub

Showing 400 of 400 total issues

Function childResult has 32 lines of code (exceeds 30 allowed). Consider refactoring.
Open

export function childResult(child: ChildStreams): Promise<ChildResult> {
  return new Promise((res, rej) => {
    const stderr: Array<Buffer> = [];
    const stdout: Array<Buffer> = [];

Severity: Minor
Found in src/Child.ts - About 1 hr to fix

    Function getMethods has a Cognitive Complexity of 10 (exceeds 6 allowed). Consider refactoring.
    Open

    export function getMethods<TValue extends Reflectable>(value: TValue): Set<Method<TValue>> {
      const methods = new Set<Method<TValue>>();
    
      for (const name of Object.getOwnPropertyNames(value)) {
        const desc = Object.getOwnPropertyDescriptor(value, name);
    Severity: Minor
    Found in src/Reflect.ts - About 55 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function normalizeMap has a Cognitive Complexity of 7 (exceeds 6 allowed). Consider refactoring.
    Open

    export function normalizeMap(map: MapLike<unknown>): Dict<Array<string>> {
      const data: Dict<Array<string>> = {};
      for (const [key, value] of makeMap(map)) {
        // eslint-disable-next-line no-restricted-syntax
        if (Array.isArray(value)) {
    Severity: Minor
    Found in src/Map.ts - About 25 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

    Trailing spaces
    Open

    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

        INCLUDE = "include"
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // @public
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    export function filterZip<T1, T2, T3, T4>(cb: (a: T1, b: T2) => boolean, l1: Array<T1>, l2: Array<T2>, l3: Array<T3>, l4: Array<T4>): [Array<T1>, Array<T2>, Array<T3>, Array<T4>];
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // Warning: (ae-forgotten-export) The symbol "Method" needs to be exported by the entry point index.d.ts
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // @public
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // @public
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // @public (undocumented)
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    export function mergeMap<TKey, TVal>(target: Map<TKey, TVal>, source: Map<TKey, TVal> | ReadonlyArray<[TKey, TVal]>): Map<TKey, TVal>;
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // @public
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // @public (undocumented)
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

        // (undocumented)
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Trailing spaces
    Open

    // @public (undocumented)
    Severity: Info
    Found in docs/js-utils.api.md by markdownlint

    MD009 - Trailing spaces

    Tags: whitespace

    Aliases: no-trailing-spaces

    Parameters: br_spaces (number; default: 0)

    This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

    The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

    Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

    Severity
    Category
    Status
    Source
    Language