TargetProcess/tauCharts

View on GitHub
src/charts/tau.plot.ts

Summary

Maintainability
F
5 days
Test Coverage

File tau.plot.ts has 796 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {Balloon} from '../api/balloon';
import {Emitter, EventHandlerMap} from '../event';
import {Plugins} from '../plugins';
import * as utils from '../utils/utils';
import * as utilsDom from '../utils/utils-dom';
Severity: Major
Found in src/charts/tau.plot.ts - About 1 day to fix

    Plot has 65 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export class Plot extends Emitter {
    
        protected _nodes: GrammarElement[];
        protected _svg: SVGSVGElement;
        protected _filtersStore: {
    Severity: Major
    Found in src/charts/tau.plot.ts - About 1 day to fix

      Function _displayTimeoutWarning has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _displayTimeoutWarning({proceed, cancel, timeout}: {proceed: () => void, cancel: () => void, timeout: number}) {
              var width = 200;
              var height = 100;
              var linesCount = 3;
              var lineSpacing = 1.5;
      Severity: Major
      Found in src/charts/tau.plot.ts - About 2 hrs to fix

        Function _setupTaskRunner has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _setupTaskRunner(liveSpec: GPLSpec) {
                this._resetTaskRunner();
                this._taskRunner = new TaskRunner({
                    timeout: (liveSpec.settings.renderingTimeout || Number.MAX_SAFE_INTEGER),
                    syncInterval: (liveSpec.settings.asyncRendering ?
        Severity: Minor
        Found in src/charts/tau.plot.ts - About 1 hr to fix

          Function _handlePointerEvent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _handlePointerEvent(event: MouseEvent) {
                  // TODO: Highlight API seems not consistent.
                  // Just predicate is not enough, also
                  // need coordinates or event object.
                  const svgRect = this._svg.getBoundingClientRect();
          Severity: Minor
          Found in src/charts/tau.plot.ts - About 1 hr to fix

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

                _initPointerEvents() {
                    if (!this._liveSpec.settings.syncPointerEvents) {
                        this._pointerAnimationFrameId = null;
                    }
                    const svg = d3.select(this._svg);
            Severity: Minor
            Found in src/charts/tau.plot.ts - About 1 hr to fix

            Cognitive Complexity

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

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

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

            Further reading

            Function _renderRoot has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _renderRoot({scenario, newSize}: {scenario: GrammarElement[]; newSize: Size;}) {
                    const d3Target = d3.select(this._layout.content);
                    var frameRootId = scenario[0].config.uid;
                    var svg = selectOrAppend(d3Target, `svg`)
                        .attr('width', Math.floor(newSize.width))
            Severity: Minor
            Found in src/charts/tau.plot.ts - About 1 hr to fix

              Function _initPointerEvents has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _initPointerEvents() {
                      if (!this._liveSpec.settings.syncPointerEvents) {
                          this._pointerAnimationFrameId = null;
                      }
                      const svg = d3.select(this._svg);
              Severity: Minor
              Found in src/charts/tau.plot.ts - About 1 hr to fix

                Function _insertLayout has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _insertLayout(target: HTMLElement | string, xSize?: Size) {
                        this._target = target;
                        this._defaultSize = Object.assign({}, xSize);
                
                        var targetNode: Element = d3.select(target as any).node();
                Severity: Minor
                Found in src/charts/tau.plot.ts - About 1 hr to fix

                  Function _handlePointerEvent has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                      _handlePointerEvent(event: MouseEvent) {
                          // TODO: Highlight API seems not consistent.
                          // Just predicate is not enough, also
                          // need coordinates or event object.
                          const svgRect = this._svg.getBoundingClientRect();
                  Severity: Minor
                  Found in src/charts/tau.plot.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 _insertLayout has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      _insertLayout(target: HTMLElement | string, xSize?: Size) {
                          this._target = target;
                          this._defaultSize = Object.assign({}, xSize);
                  
                          var targetNode: Element = d3.select(target as any).node();
                  Severity: Minor
                  Found in src/charts/tau.plot.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

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

                          this._layout.content
                              .querySelector(`.${CSS_PREFIX}rendering-timeout-continue-btn`)
                              .addEventListener('click', () => {
                                  this._clearTimeoutWarning();
                                  proceed.call(this);
                  Severity: Major
                  Found in src/charts/tau.plot.ts and 1 other location - About 1 hr to fix
                  src/charts/tau.plot.ts on lines 914..919

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

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

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

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

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

                  Refactorings

                  Further Reading

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

                          this._layout.content
                              .querySelector(`.${CSS_PREFIX}rendering-timeout-cancel-btn`)
                              .addEventListener('click', () => {
                                  this._clearTimeoutWarning();
                                  cancel.call(this);
                  Severity: Major
                  Found in src/charts/tau.plot.ts and 1 other location - About 1 hr to fix
                  src/charts/tau.plot.ts on lines 908..913

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

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

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

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

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

                  Refactorings

                  Further Reading

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

                      on(
                          event: 'render' | 'beforerender',
                          callback: (chart: Plot, svg: SVGSVGElement) => void,
                          context?
                      ): EventHandlerMap;
                  Severity: Minor
                  Found in src/charts/tau.plot.ts and 1 other location - About 35 mins to fix
                  src/charts/tau.plot.ts on lines 94..98

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 47.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      on(
                          event: 'specready' | 'unitsstructureexpanded',
                          callback: (chart: Plot, spec: GPLSpec) => void,
                          context?
                      ): EventHandlerMap;
                  Severity: Minor
                  Found in src/charts/tau.plot.ts and 1 other location - About 35 mins to fix
                  src/charts/tau.plot.ts on lines 89..93

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 47.

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

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

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

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

                  Refactorings

                  Further Reading

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

                          var data = null;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 frameRootId = scenario[0].config.uid;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 progressBar = selectOrAppend(header, `div.${CSS_PREFIX}progress`);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'scrollTop' is never reassigned; use 'const' instead of 'let'.
                  Open

                              let {scrollLeft, scrollTop} = content.parentElement;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'gpl' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var gpl = new GPL(liveSpec, this.getScaleFactory(), unitsRegistry, GrammarRegistry);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'filterIterator' is never reassigned; use 'const' instead of 'var'.
                  Open

                                  var filterIterator = this.getSourceFiltersIterator(excludeFiltersByTagAndSource(k));
                  Severity: Minor
                  Found in src/charts/tau.plot.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 log = resConfig.settings.log;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 gpl = new GPL(liveSpec, this.getScaleFactory(), unitsRegistry, GrammarRegistry);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'scales' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var scales = Object
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'frameRootId' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var frameRootId = scenario[0].config.uid;
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
                  Open

                              (<any>spec.settings).initialAnimationSpeed : 0);
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-angle-bracket-type-assertion

                  Requires the use of as Type for type assertions instead of <Type>.

                  Rationale

                  Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

                  Notes
                  • TypeScript Only
                  • Has Fix

                  Config

                  Not configurable.

                  Examples
                  "no-angle-bracket-type-assertion": true

                  For more information see this page.

                  Shadowed name: 'iterator'
                  Open

                          var traverse = (node, iterator, parentNode, parentFrame) => {
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-shadowed-variable

                  Disallows shadowing variable declarations.

                  Rationale

                  When a variable in a local scope and a variable in the containing scope have the same name, shadowing occurs. Shadowing makes it impossible to access the variable in the containing scope and obscures to what value an identifier actually refers. Compare the following snippets:

                  const a = 'no shadow';
                  function print() {
                      console.log(a);
                  }
                  print(); // logs 'no shadow'.
                  const a = 'no shadow';
                  function print() {
                      const a = 'shadow'; // TSLint will complain here.
                      console.log(a);
                  }
                  print(); // logs 'shadow'.

                  ESLint has an equivalent rule. For more background information, refer to this MDN closure doc.

                  Config

                  You can optionally pass an object to disable checking for certain kinds of declarations. Possible keys are "class", "enum", "function", "import", "interface", "namespace", "typeAlias" and "typeParameter". You can also pass "underscore" to ignore variable names that begin with _. Just set the value to false for the check you want to disable. All checks default to true, i.e. are enabled by default. Note that you cannot disable variables and parameters.

                  The option "temporalDeadZone" defaults to true which shows errors when shadowing block scoped declarations in their temporal dead zone. When set to false parameters, classes, enums and variables declared with let or const are not considered shadowed if the shadowing occurs within their temporal dead zone.

                  The following example shows how the "temporalDeadZone" option changes the linting result:

                  function fn(value) {
                      if (value) {
                          const tmp = value; // no error on this line if "temporalDeadZone" is false
                          return tmp;
                      }
                      let tmp = undefined;
                      if (!value) {
                          const tmp = value; // this line always contains an error
                          return tmp;
                      }
                  }
                  Examples
                  "no-shadowed-variable": true
                  "no-shadowed-variable": true,[object Object]
                  Schema
                  {
                    "type": "object",
                    "properties": {
                      "class": {
                        "type": "boolean"
                      },
                      "enum": {
                        "type": "boolean"
                      },
                      "function": {
                        "type": "boolean"
                      },
                      "import": {
                        "type": "boolean"
                      },
                      "interface": {
                        "type": "boolean"
                      },
                      "namespace": {
                        "type": "boolean"
                      },
                      "typeAlias": {
                        "type": "boolean"
                      },
                      "typeParameter": {
                        "type": "boolean"
                      },
                      "temporalDeadZone": {
                        "type": "boolean"
                      },
                      "underscore": {
                        "type": "boolean"
                      }
                    }
                  }

                  For more information see this page.

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

                          var targetNode: Element = d3.select(target as any).node();
                  Severity: Minor
                  Found in src/charts/tau.plot.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 header = d3.select(this._layout.header);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 lineSpacing = 1.5;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 getY = function (line) {
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'log' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var log = spec.settings.log;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'header' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var header = d3.select(this._layout.header);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'item' is never reassigned; use 'const' instead of 'var'.
                  Open

                                  var item = chartDataModel[k];
                  Severity: Minor
                  Found in src/charts/tau.plot.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 localSettings = Object
                  Severity: Minor
                  Found in src/charts/tau.plot.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 unit = item.node();
                  Severity: Minor
                  Found in src/charts/tau.plot.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 node: Element = null;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 tag = filter.tag;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 id = this._filtersStore.tick++;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 height = 100;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'p' is never reassigned; use 'const' instead of 'var'.
                  Open

                                      var p = (phases[this._renderingPhase] / 2 + progress / 2);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'targetNode' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var targetNode: Element = d3.select(target as any).node();
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'id' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var id = this._filtersStore.tick++;
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
                  Open

                          return new (<any>Balloon)('', conf || {});
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-angle-bracket-type-assertion

                  Requires the use of as Type for type assertions instead of <Type>.

                  Rationale

                  Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

                  Notes
                  • TypeScript Only
                  • Has Fix

                  Config

                  Not configurable.

                  Examples
                  "no-angle-bracket-type-assertion": true

                  For more information see this page.

                  Shadowed name: 'handler'
                  Open

                              ((handler) => () => handler(d3_selection.event)) :
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-shadowed-variable

                  Disallows shadowing variable declarations.

                  Rationale

                  When a variable in a local scope and a variable in the containing scope have the same name, shadowing occurs. Shadowing makes it impossible to access the variable in the containing scope and obscures to what value an identifier actually refers. Compare the following snippets:

                  const a = 'no shadow';
                  function print() {
                      console.log(a);
                  }
                  print(); // logs 'no shadow'.
                  const a = 'no shadow';
                  function print() {
                      const a = 'shadow'; // TSLint will complain here.
                      console.log(a);
                  }
                  print(); // logs 'shadow'.

                  ESLint has an equivalent rule. For more background information, refer to this MDN closure doc.

                  Config

                  You can optionally pass an object to disable checking for certain kinds of declarations. Possible keys are "class", "enum", "function", "import", "interface", "namespace", "typeAlias" and "typeParameter". You can also pass "underscore" to ignore variable names that begin with _. Just set the value to false for the check you want to disable. All checks default to true, i.e. are enabled by default. Note that you cannot disable variables and parameters.

                  The option "temporalDeadZone" defaults to true which shows errors when shadowing block scoped declarations in their temporal dead zone. When set to false parameters, classes, enums and variables declared with let or const are not considered shadowed if the shadowing occurs within their temporal dead zone.

                  The following example shows how the "temporalDeadZone" option changes the linting result:

                  function fn(value) {
                      if (value) {
                          const tmp = value; // no error on this line if "temporalDeadZone" is false
                          return tmp;
                      }
                      let tmp = undefined;
                      if (!value) {
                          const tmp = value; // this line always contains an error
                          return tmp;
                      }
                  }
                  Examples
                  "no-shadowed-variable": true
                  "no-shadowed-variable": true,[object Object]
                  Schema
                  {
                    "type": "object",
                    "properties": {
                      "class": {
                        "type": "boolean"
                      },
                      "enum": {
                        "type": "boolean"
                      },
                      "function": {
                        "type": "boolean"
                      },
                      "import": {
                        "type": "boolean"
                      },
                      "interface": {
                        "type": "boolean"
                      },
                      "namespace": {
                        "type": "boolean"
                      },
                      "typeAlias": {
                        "type": "boolean"
                      },
                      "typeParameter": {
                        "type": "boolean"
                      },
                      "temporalDeadZone": {
                        "type": "boolean"
                      },
                      "underscore": {
                        "type": "boolean"
                      }
                    }
                  }

                  For more information see this page.

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

                  var selectImmediate = utilsDom.selectImmediate;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 size = Object.assign({}, xSize) || {};
                  Severity: Minor
                  Found in src/charts/tau.plot.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 sources = this.getDataSources(param);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'progressValue' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var progressValue = progressBar.append('div')
                  Severity: Minor
                  Found in src/charts/tau.plot.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 resConfig: ChartConfig = utils.defaults(
                  Severity: Minor
                  Found in src/charts/tau.plot.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 r = utils.defaults(configSettings || {}, localSettings);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 closest = item.getClosestElement(x0, y0);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 unit: GrammarElement = null;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 width = 200;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 linesCount = 3;
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  non-arrow functions are forbidden
                  Open

                          this._reportProgress = function (value) {
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: only-arrow-functions

                  Disallows traditional (non-arrow) function expressions.

                  Note that non-arrow functions are allowed if 'this' appears somewhere in its body (as such functions cannot be converted to arrow functions).

                  Rationale

                  Traditional functions don't bind lexical scope, which can lead to unexpected behavior when accessing 'this'.

                  Config

                  Two arguments may be optionally provided:

                  • "allow-declarations" allows standalone function declarations.
                  • "allow-named-functions" allows the expression function foo() {} but not function() {}.
                  Examples
                  "only-arrow-functions": true
                  "only-arrow-functions": true,allow-declarations,allow-named-functions
                  Schema
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "allow-declarations",
                        "allow-named-functions"
                      ]
                    },
                    "minLength": 0,
                    "maxLength": 1
                  }

                  For more information see this page.

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

                          var localSettings = Object
                  Severity: Minor
                  Found in src/charts/tau.plot.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 log = spec.settings.log;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'taskRunner' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var taskRunner = this._setupTaskRunner(liveSpec);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 e = d3_selection.event;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'lineSpacing' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var lineSpacing = 1.5;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 roots = (svg.selectAll('g.frame-root') as d3.Selection<SVGElement, string, SVGSVGElement, any>)
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Type assertion on object literals is forbidden, use a type annotation instead.
                  Open

                              {
                                  '?': chartDataModel['?']
                              } as DataSources);
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-object-literal-type-assertion

                  Forbids an object literal to appear in a type assertion expression. Casting to any or to unknown is still allowed.

                  Rationale

                  Always prefer const x: T = { ... }; to const x = { ... } as T;. The type assertion in the latter case is either unnecessary or hides an error. The compiler will warn for excess properties with this syntax, but not missing required fields. For example: const x: { foo: number } = {} will fail to compile, but const x = {} as { foo: number } will succeed. Additionally, the const assertion const x = { foo: 1 } as const, introduced in TypeScript 3.4, is considered beneficial and is ignored by this rule.

                  Notes
                  • TypeScript Only

                  Config

                  One option may be configured:

                  • allow-arguments allows type assertions to be used on object literals inside call expressions.
                  Examples
                  "no-object-literal-type-assertion": true
                  "no-object-literal-type-assertion": true,[object Object]
                  Schema
                  {
                    "type": "object",
                    "properties": {
                      "allow-arguments": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }

                  For more information see this page.

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

                          var sources = this.getDataSources(param);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'height' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var height = 100;
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
                  Open

                                          <PointerEventArgs>{
                                              element: sender,
                                              data: e.data,
                                              event: e.event
                                          }
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-angle-bracket-type-assertion

                  Requires the use of as Type for type assertions instead of <Type>.

                  Rationale

                  Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

                  Notes
                  • TypeScript Only
                  • Has Fix

                  Config

                  Not configurable.

                  Examples
                  "no-angle-bracket-type-assertion": true

                  For more information see this page.

                  Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
                  Open

                          (<any>spec.settings).initialAnimationSpeed = (
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-angle-bracket-type-assertion

                  Requires the use of as Type for type assertions instead of <Type>.

                  Rationale

                  Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

                  Notes
                  • TypeScript Only
                  • Has Fix

                  Config

                  Not configurable.

                  Examples
                  "no-angle-bracket-type-assertion": true

                  For more information see this page.

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

                  var selectOrAppend = utilsDom.selectOrAppend;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 midX = width / 2;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'meta' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var meta = (dims) ? dims : DataProcessor.autoDetectDimTypes(data);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'r' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var r = utils.defaults(configSettings || {}, localSettings);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 's' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var s = utilsDom.getScrollbarSize(this._layout.contentContainer);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'progressBar' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var progressBar = selectOrAppend(header, `div.${CSS_PREFIX}progress`);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'selectOrAppend' is never reassigned; use 'const' instead of 'var'.
                  Open

                  var selectOrAppend = utilsDom.selectOrAppend;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 periodCaster = tickPeriod.get(scaleRef.period, {utc: spec.settings.utcTime});
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'resConfig' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var resConfig: ChartConfig = utils.defaults(
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'width' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var width = 200;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 taskRunner = this._setupTaskRunner(liveSpec);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 s = utilsDom.getScrollbarSize(this._layout.contentContainer);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 item = chartDataModel[k];
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  non-arrow functions are forbidden
                  Open

                          var getY = function (line) {
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: only-arrow-functions

                  Disallows traditional (non-arrow) function expressions.

                  Note that non-arrow functions are allowed if 'this' appears somewhere in its body (as such functions cannot be converted to arrow functions).

                  Rationale

                  Traditional functions don't bind lexical scope, which can lead to unexpected behavior when accessing 'this'.

                  Config

                  Two arguments may be optionally provided:

                  • "allow-declarations" allows standalone function declarations.
                  • "allow-named-functions" allows the expression function foo() {} but not function() {}.
                  Examples
                  "only-arrow-functions": true
                  "only-arrow-functions": true,allow-declarations,allow-named-functions
                  Schema
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "allow-declarations",
                        "allow-named-functions"
                      ]
                    },
                    "minLength": 0,
                    "maxLength": 1
                  }

                  For more information see this page.

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

                          var globalSettings = Plot.globalSettings;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'filters' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var filters = utils.flatten(Object.keys(this._filtersStore.filters).map(key => this._filtersStore.filters[key]))
                  Severity: Minor
                  Found in src/charts/tau.plot.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 structure = gpl.unfoldStructure();
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'excludeFiltersByTagAndSource' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var excludeFiltersByTagAndSource = (k: string) =>
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'midX' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var midX = width / 2;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'closest' is never reassigned; use 'const' instead of 'var'.
                  Open

                                  var closest = item.getClosestElement(x0, y0);
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Type assertion on object literals is forbidden, use a type annotation instead.
                  Open

                                          <PointerEventArgs>{
                                              element: sender,
                                              data: e.data,
                                              event: e.event
                                          }
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-object-literal-type-assertion

                  Forbids an object literal to appear in a type assertion expression. Casting to any or to unknown is still allowed.

                  Rationale

                  Always prefer const x: T = { ... }; to const x = { ... } as T;. The type assertion in the latter case is either unnecessary or hides an error. The compiler will warn for excess properties with this syntax, but not missing required fields. For example: const x: { foo: number } = {} will fail to compile, but const x = {} as { foo: number } will succeed. Additionally, the const assertion const x = { foo: 1 } as const, introduced in TypeScript 3.4, is considered beneficial and is ignored by this rule.

                  Notes
                  • TypeScript Only

                  Config

                  One option may be configured:

                  • allow-arguments allows type assertions to be used on object literals inside call expressions.
                  Examples
                  "no-object-literal-type-assertion": true
                  "no-object-literal-type-assertion": true,[object Object]
                  Schema
                  {
                    "type": "object",
                    "properties": {
                      "allow-arguments": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }

                  For more information see this page.

                  Identifier 'scrollLeft' is never reassigned; use 'const' instead of 'let'.
                  Open

                              let {scrollLeft, scrollTop} = content.parentElement;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'svg' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var svg = selectOrAppend(d3Target, `svg`)
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'tag' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var tag = filter.tag;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'getY' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var getY = function (line) {
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'selectImmediate' is never reassigned; use 'const' instead of 'var'.
                  Open

                  var selectImmediate = utilsDom.selectImmediate;
                  Severity: Minor
                  Found in src/charts/tau.plot.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

                          this._originData = Object.assign({}, this.configGPL.sources);
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Use the object spread operator instead.
                  Open

                          var size = Object.assign({}, xSize) || {};
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

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

                          var scales = Object
                  Severity: Minor
                  Found in src/charts/tau.plot.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 = (phases[this._renderingPhase] / 2 + progress / 2);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 svg = selectOrAppend(d3Target, `svg`)
                  Severity: Minor
                  Found in src/charts/tau.plot.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 progressValue = progressBar.append('div')
                  Severity: Minor
                  Found in src/charts/tau.plot.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 excludeFiltersByTagAndSource = (k: string) =>
                  Severity: Minor
                  Found in src/charts/tau.plot.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 warning = selectImmediate(this._layout.content, `.${CSS_PREFIX}rendering-timeout-warning`);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'log' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var log = resConfig.settings.log;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'unit' is never reassigned; use 'const' instead of 'var'.
                  Open

                                  var unit = item.node();
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'gpl' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var gpl = this._createGPL(liveSpec);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'content' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var content = this._layout.content;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'structure' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var structure = gpl.unfoldStructure();
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'traverse' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var traverse = (node, iterator, parentNode, parentFrame) => {
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'linesCount' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var linesCount = 3;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'warning' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var warning = selectImmediate(this._layout.content, `.${CSS_PREFIX}rendering-timeout-warning`);
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
                  Open

                              (<any>spec.settings).initialAnimationSpeed ||
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-angle-bracket-type-assertion

                  Requires the use of as Type for type assertions instead of <Type>.

                  Rationale

                  Both formats of type assertions have the same effect, but only as type assertions work in .tsx files. This rule ensures that you have a consistent type assertion style across your codebase.

                  Notes
                  • TypeScript Only
                  • Has Fix

                  Config

                  Not configurable.

                  Examples
                  "no-angle-bracket-type-assertion": true

                  For more information see this page.

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

                                      var phases = {
                  Severity: Minor
                  Found in src/charts/tau.plot.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 traverse = (node, iterator, parentNode, parentFrame) => {
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'tickPeriod' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var tickPeriod: typeof UnitDomainPeriodGenerator = Plot.__api__.tickPeriod;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'roots' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var roots = (svg.selectAll('g.frame-root') as d3.Selection<SVGElement, string, SVGSVGElement, any>)
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Shadowed name: 'handler'
                  Open

                              ((handler) => (() => {
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-shadowed-variable

                  Disallows shadowing variable declarations.

                  Rationale

                  When a variable in a local scope and a variable in the containing scope have the same name, shadowing occurs. Shadowing makes it impossible to access the variable in the containing scope and obscures to what value an identifier actually refers. Compare the following snippets:

                  const a = 'no shadow';
                  function print() {
                      console.log(a);
                  }
                  print(); // logs 'no shadow'.
                  const a = 'no shadow';
                  function print() {
                      const a = 'shadow'; // TSLint will complain here.
                      console.log(a);
                  }
                  print(); // logs 'shadow'.

                  ESLint has an equivalent rule. For more background information, refer to this MDN closure doc.

                  Config

                  You can optionally pass an object to disable checking for certain kinds of declarations. Possible keys are "class", "enum", "function", "import", "interface", "namespace", "typeAlias" and "typeParameter". You can also pass "underscore" to ignore variable names that begin with _. Just set the value to false for the check you want to disable. All checks default to true, i.e. are enabled by default. Note that you cannot disable variables and parameters.

                  The option "temporalDeadZone" defaults to true which shows errors when shadowing block scoped declarations in their temporal dead zone. When set to false parameters, classes, enums and variables declared with let or const are not considered shadowed if the shadowing occurs within their temporal dead zone.

                  The following example shows how the "temporalDeadZone" option changes the linting result:

                  function fn(value) {
                      if (value) {
                          const tmp = value; // no error on this line if "temporalDeadZone" is false
                          return tmp;
                      }
                      let tmp = undefined;
                      if (!value) {
                          const tmp = value; // this line always contains an error
                          return tmp;
                      }
                  }
                  Examples
                  "no-shadowed-variable": true
                  "no-shadowed-variable": true,[object Object]
                  Schema
                  {
                    "type": "object",
                    "properties": {
                      "class": {
                        "type": "boolean"
                      },
                      "enum": {
                        "type": "boolean"
                      },
                      "function": {
                        "type": "boolean"
                      },
                      "import": {
                        "type": "boolean"
                      },
                      "interface": {
                        "type": "boolean"
                      },
                      "namespace": {
                        "type": "boolean"
                      },
                      "typeAlias": {
                        "type": "boolean"
                      },
                      "typeParameter": {
                        "type": "boolean"
                      },
                      "temporalDeadZone": {
                        "type": "boolean"
                      },
                      "underscore": {
                        "type": "boolean"
                      }
                    }
                  }

                  For more information see this page.

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

                          var tickPeriod: typeof UnitDomainPeriodGenerator = Plot.__api__.tickPeriod;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 meta = (dims) ? dims : DataProcessor.autoDetectDimTypes(data);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 globalSettings = Plot.globalSettings;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 filters = utils.flatten(Object.keys(this._filtersStore.filters).map(key => this._filtersStore.filters[key]))
                  Severity: Minor
                  Found in src/charts/tau.plot.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 chartDataModel = this._chartDataModel(this._originData);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 filterIterator = this.getSourceFiltersIterator(excludeFiltersByTagAndSource(k));
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Use the object spread operator instead.
                  Open

                          this._defaultSize = Object.assign({}, xSize);
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

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

                          var content = this._layout.content;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'e' is never reassigned; use 'const' instead of 'var'.
                  Open

                                  var e = d3_selection.event;
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'chartDataModel' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var chartDataModel = this._chartDataModel(this._originData);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'fontSize' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var fontSize = Math.round(height / linesCount / lineSpacing);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 gpl = this._createGPL(liveSpec);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 filters = this._filtersStore.filters[tag] = this._filtersStore.filters[tag] || [];
                  Severity: Minor
                  Found in src/charts/tau.plot.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 fontSize = Math.round(height / linesCount / lineSpacing);
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'periodCaster' is never reassigned; use 'const' instead of 'var'.
                  Open

                                  var periodCaster = tickPeriod.get(scaleRef.period, {utc: spec.settings.utcTime});
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'phases' is never reassigned; use 'const' instead of 'var'.
                  Open

                                      var phases = {
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  Type assertion on object literals is forbidden, use a type annotation instead.
                  Open

                              }, {} as ChartSettings);
                  Severity: Minor
                  Found in src/charts/tau.plot.ts by tslint

                  Rule: no-object-literal-type-assertion

                  Forbids an object literal to appear in a type assertion expression. Casting to any or to unknown is still allowed.

                  Rationale

                  Always prefer const x: T = { ... }; to const x = { ... } as T;. The type assertion in the latter case is either unnecessary or hides an error. The compiler will warn for excess properties with this syntax, but not missing required fields. For example: const x: { foo: number } = {} will fail to compile, but const x = {} as { foo: number } will succeed. Additionally, the const assertion const x = { foo: 1 } as const, introduced in TypeScript 3.4, is considered beneficial and is ignored by this rule.

                  Notes
                  • TypeScript Only

                  Config

                  One option may be configured:

                  • allow-arguments allows type assertions to be used on object literals inside call expressions.
                  Examples
                  "no-object-literal-type-assertion": true
                  "no-object-literal-type-assertion": true,[object Object]
                  Schema
                  {
                    "type": "object",
                    "properties": {
                      "allow-arguments": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }

                  For more information see this page.

                  missing whitespace
                  Open

                      _renderRoot({scenario, newSize}: {scenario: GrammarElement[]; newSize: Size;}) {
                  Severity: Minor
                  Found in src/charts/tau.plot.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 'filters' is never reassigned; use 'const' instead of 'var'.
                  Open

                          var filters = this._filtersStore.filters[tag] = this._filtersStore.filters[tag] || [];
                  Severity: Minor
                  Found in src/charts/tau.plot.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.

                  There are no issues that match your filters.

                  Category
                  Status