TargetProcess/tauCharts

View on GitHub
src/spec-transform-extract-axes.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Function ruleExtractAxes has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ruleExtractAxes(spec: GPLSpec) {

        var isCoordsRect = (unitRef: Unit) => {
            return (unitRef.type === 'COORDS.RECT' || unitRef.type === 'RECT');
        };
Severity: Major
Found in src/spec-transform-extract-axes.ts - About 2 hrs to fix

    Function ruleExtractAxes has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        ruleExtractAxes(spec: GPLSpec) {
    
            var isCoordsRect = (unitRef: Unit) => {
                return (unitRef.type === 'COORDS.RECT' || unitRef.type === 'RECT');
            };
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts - About 45 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

                var rects = units
                    .map((x) => {
    
                        if (!(isCoordsRect(x) || isElement(x))) {
                            throw new Error('Not applicable');
    Severity: Major
    Found in src/spec-transform-extract-axes.ts and 1 other location - About 1 hr to fix
    src/spec-transform-apply-ratio.ts on lines 78..87

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

            var ttlNoTicks = {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

            var isCoordsRect = (unitRef: Unit) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

            var exitIterator = (unitRef: Unit) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

            var refSpec = this.spec;
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

            var isCoordsRect = (unitRef: Unit) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

                var lvl = seq.pop();
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

                var guide = unitRef.guide || {};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

                var p = guide.padding || {l:0, r:0, t:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

    missing whitespace
    Open

                var pNoTicks = guide.paddingNoTicks || {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

            var isElement = (unitRef: Unit) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var guide = unitRef.guide;
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var pNoTicks = guide.paddingNoTicks || {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

            var seq: (typeof ttl)[] = [];
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

            var refSpec = this.spec;
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var units = unitRef.units || [];
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var rects = units
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var lvlNoTicks = seqNoTicks.pop();
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

    missing whitespace
    Open

                var p = guide.padding || {l:0, r:0, t:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

            var seq: (typeof ttl)[] = [];
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var p = guide.padding || {l:0, r:0, t:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var lvl = seq.pop();
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

            var pad = (x) => (x ? 10 : 0);
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

            var isElement = (unitRef: Unit) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

                var guide = unitRef.guide || {};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

    missing whitespace
    Open

                var p = guide.padding || {l:0, r:0, t:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

            var ttl = {l:0, r:10, t:10, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var units = unitRef.units || [];
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

                var rects = units
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

            var seqNoTicks: (typeof ttlNoTicks)[] = [];
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

    missing whitespace
    Open

            var ttl = {l:0, r:10, t:10, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

                var guide = unitRef.guide;
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

            var pad = (x) => (x ? 10 : 0);
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

            var enterIterator = (unitRef: Unit, level: number) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

    missing whitespace
    Open

                var p = guide.padding || {l:0, r:0, t:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

            var enterIterator = (unitRef: Unit, level: number) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

            var ttlNoTicks = {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

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

            var exitIterator = (unitRef: Unit) => {
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

    missing whitespace
    Open

                var pNoTicks = guide.paddingNoTicks || {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

    Use the object spread operator instead.
    Open

                seqNoTicks.push(Object.assign({}, ttlNoTicks));
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-object-spread

    Enforces the use of the ES2018 object spread operator over Object.assign() where appropriate.

    Rationale

    Object spread allows for better type checking and inference.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "prefer-object-spread": true

    For more information see this page.

    missing whitespace
    Open

            var ttl = {l:0, r:10, t:10, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

            var seqNoTicks: (typeof ttlNoTicks)[] = [];
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

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

                var lvlNoTicks = seqNoTicks.pop();
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

    missing whitespace
    Open

            var ttl = {l:0, r:10, t:10, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

    missing whitespace
    Open

            var ttlNoTicks = {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

                var pNoTicks = guide.paddingNoTicks || {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: no-var-keyword

    Disallows usage of the var keyword.

    Use let or const instead.

    Rationale

    Declaring variables using var has several edge case behaviors that make var unsuitable for modern code. Variables declared by var have their parent function block as their scope, ignoring other control flow statements. vars have declaration "hoisting" (similar to functions) and can appear to be used before declaration.

    Variables declared by const and let instead have as their scope the block in which they are defined, and are not allowed to used before declaration or be re-declared with another const or let.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "no-var-keyword": true

    For more information see this page.

    missing whitespace
    Open

            var ttlNoTicks = {l:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

    missing whitespace
    Open

                var p = guide.padding || {l:0, r:0, t:0, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

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

            var ttl = {l:0, r:10, t:10, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-const

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

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

    Notes
    • Has Fix

    Config

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

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

    For more information see this page.

    Use the object spread operator instead.
    Open

                seq.push(Object.assign({}, ttl));
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: prefer-object-spread

    Enforces the use of the ES2018 object spread operator over Object.assign() where appropriate.

    Rationale

    Object spread allows for better type checking and inference.

    Notes
    • Has Fix

    Config

    Not configurable.

    Examples
    "prefer-object-spread": true

    For more information see this page.

    missing whitespace
    Open

            var ttl = {l:0, r:10, t:10, b:0};
    Severity: Minor
    Found in src/spec-transform-extract-axes.ts by tslint

    Rule: whitespace

    Enforces whitespace style conventions.

    Rationale

    Helps maintain a readable, consistent style in your codebase.

    Notes
    • Has Fix

    Config

    Several arguments may be optionally provided:

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

    For more information see this page.

    There are no issues that match your filters.

    Category
    Status