TargetProcess/tauCharts

View on GitHub
src/utils/path/interpolators/path-points.ts

Summary

Maintainability
F
5 days
Test Coverage

File path-points.ts has 606 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import * as utils from '../../utils';
import {getBezierPoint, splitCubicSegment as split} from '../bezier';
import {Point} from '../point';

interface XPoint extends Point {
Severity: Major
Found in src/utils/path/interpolators/path-points.ts - About 1 day to fix

    Function getCubicInterpolator has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function getCubicInterpolator(pointsFrom: XPoint[], pointsTo: XPoint[]) {
    
        for (var i = 2; i < pointsFrom.length - 1; i += 3) {
            pointsFrom[i - 1].isCubicControl = true;
            pointsFrom[i].isCubicControl = true;
    Severity: Major
    Found in src/utils/path/interpolators/path-points.ts - About 4 hrs to fix

      Function getLinearInterpolator has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function getLinearInterpolator(pointsFrom: XPoint[], pointsTo: XPoint[]): (t: number) => XPoint[] {
      
          // TODO: Continue unfinished transition of ending points.
          pointsFrom = pointsFrom.filter(d => !d.isInterpolated);
      
      
      Severity: Major
      Found in src/utils/path/interpolators/path-points.ts - About 2 hrs to fix

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

            var result = (function getLinePiece(t, line) {
                var pointsCount = (line.length - 1) / 3 + 1;
                var q = 0;
                if (t > 0) {
                    var distance = [0];
        Severity: Major
        Found in src/utils/path/interpolators/path-points.ts - About 2 hrs to fix

          Function interpolateCubicEnding has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

          function interpolateCubicEnding({t, polyline, decreasing, rightToLeft}) {
          
              var reverse = Boolean(decreasing) !== Boolean(rightToLeft);
          
              var result = (function getLinePiece(t, line) {
          Severity: Minor
          Found in src/utils/path/interpolators/path-points.ts - About 2 hrs 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 interpolateEnding has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

          function interpolateEnding({t, polyline, decreasing, rightToLeft}) {
          
              var reverse = Boolean(decreasing) !== Boolean(rightToLeft);
          
              var result = (function getLinePiece(t, line) {
          Severity: Minor
          Found in src/utils/path/interpolators/path-points.ts - About 2 hrs 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 getScaleDiffFn has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function getScaleDiffFn(points1, points2) {
          
              // Find remaining points with predictable position
              var src = [];
              var dst = [];
          Severity: Major
          Found in src/utils/path/interpolators/path-points.ts - About 2 hrs to fix

            Function getLinePiece has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var result = (function getLinePiece(t, line) {
                    var q = 0;
                    if (t > 0) {
                        var distance = [0];
                        var totalDistance = 0;
            Severity: Minor
            Found in src/utils/path/interpolators/path-points.ts - About 1 hr to fix

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

              function getCubicInterpolator(pointsFrom: XPoint[], pointsTo: XPoint[]) {
              
                  for (var i = 2; i < pointsFrom.length - 1; i += 3) {
                      pointsFrom[i - 1].isCubicControl = true;
                      pointsFrom[i].isCubicControl = true;
              Severity: Minor
              Found in src/utils/path/interpolators/path-points.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 getInnerInterpolator has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              function getInnerInterpolator({polylineFrom, polylineTo, isCubic}) {
              
                  var oldCount = polylineFrom.length;
                  var newCount = polylineTo.length;
              
              
              Severity: Minor
              Found in src/utils/path/interpolators/path-points.ts - About 45 mins to fix

              Cognitive Complexity

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

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

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

              Further reading

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

              function getScaleDiffFn(points1, points2) {
              
                  // Find remaining points with predictable position
                  var src = [];
                  var dst = [];
              Severity: Minor
              Found in src/utils/path/interpolators/path-points.ts - About 45 mins to fix

              Cognitive Complexity

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

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

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

              Further reading

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

                  return (t: number) => {
                      var intermediate: XPoint[] = [];
                      interpolators.forEach((interpolator) => {
                          var points = interpolator(t);
                          push(intermediate, points);
              Severity: Major
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 1 hr to fix
              src/utils/path/interpolators/path-points.ts on lines 258..265

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

              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

                  return (t: number) => {
                      var intermediate: XPoint[] = [];
                      interpolators.forEach(ipl => {
                          var points = ipl(t);
                          push(intermediate, points);
              Severity: Major
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 1 hr to fix
              src/utils/path/interpolators/path-points.ts on lines 126..133

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

              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

                  if (interpolators.length === 0 && (
                      pointsTo.length > 0 && remainingIds.length === 0 ||
                      pointsFrom.length > 0 && remainingIds.length === 0
                  )) {
                      interpolators.push(getNonRemainingPathInterpolator({
              Severity: Major
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 1 hr to fix
              src/utils/path/interpolators/path-points.ts on lines 247..256

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

              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

                  if (interpolators.length === 0 && (
                      pointsTo.length > 0 && remainingIds.length === 0 ||
                      pointsFrom.length > 0 && remainingIds.length === 0
                  )) {
                      interpolators.push(getNonRemainingPathInterpolator({
              Severity: Major
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 1 hr to fix
              src/utils/path/interpolators/path-points.ts on lines 115..124

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

              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

                      if (
                          i === remainingIds.length - 1 &&
                          (pointsFrom.length - indexFrom - 1 > 0 ||
                              pointsTo.length - indexTo - 1 > 0)
                      ) {
              Severity: Minor
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 55 mins to fix
              src/utils/path/interpolators/path-points.ts on lines 233..244

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

              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

                      if (
                          i === remainingIds.length - 1 &&
                          (pointsFrom.length - indexFrom - 1 > 0 ||
                          pointsTo.length - indexTo - 1 > 0)
                      ) {
              Severity: Minor
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 55 mins to fix
              src/utils/path/interpolators/path-points.ts on lines 101..112

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

              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

                  var indicesFrom = idsFrom.reduce((memo, id) => ((memo[id] = pointsFrom.findIndex(d => d.id === id), memo)), {});
              Severity: Minor
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 55 mins to fix
              src/utils/path/interpolators/path-points.ts on lines 179..179

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

              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

                  var indicesTo = idsTo.reduce((memo, id) => ((memo[id] = pointsTo.findIndex(d => d.id === id), memo)), {});
              Severity: Minor
              Found in src/utils/path/interpolators/path-points.ts and 1 other location - About 55 mins to fix
              src/utils/path/interpolators/path-points.ts on lines 178..178

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

              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

                  for (var i = 2; i < pointsFrom.length - 1; i += 3) {

              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 interpolate: (t: number) => XPoint[];

              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 idsTo = pointsTo.map(d => d.id);

              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 points = interpolator(t);

              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 indicesFrom = idsFrom.reduce((memo, id) => ((memo[id] = pointsFrom.findIndex(d => d.id === id), memo)), {});

              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.

              Shadowed name: 't'
              Open

                  var result = (function getLinePiece(t, line) {

              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.

              Shadowed name: 'i'
              Open

                          utils.range(1, tempCount).forEach((i) => {

              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 stableTo = anchorsTo.filter(d => !d.positionIsBeingChanged);

              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.

              Shadowed name: 'd'
              Open

                  var idsFrom = anchorsFrom.map(d => d.id);

              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.

              Shadowed name: 'i'
              Open

                          push(result, utils.range(tempCount).map((i) => Object.assign(

              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 prevIndexFrom = idsFrom.indexOf(remainingIds[i - 1]);

              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 d, p;

              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 anchorsTo = pointsTo.filter((d, i) => i % 3 === 0);

              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 remainingIds = idsFrom

              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 anchorsFrom = pointsFrom.filter((d, i) => i % 3 === 0);

              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 indicesTo = idsTo.reduce((memo, id) => ((memo[id] = pointsTo.findIndex(d => d.id === id), memo)), {});

              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 idsFrom = pointsFrom.map(d => d.id);

              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 idsTo = anchorsTo.map(d => d.id);

              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.

              Shadowed name: 't'
              Open

                  var result = (function getLinePiece(t, line) {

              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.

              Shadowed name: 'a'
              Open

                  var createPropDiffFn = (a0, b0, a, b) => (c0) => (

              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 stableTo = pointsTo.filter(d => !d.positionIsBeingChanged);

              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 intermediate: XPoint[] = [];

              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.

              Shadowed name: 'i'
              Open

                  var anchorsTo = pointsTo.filter((d, i) => i % 3 === 0);

              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.

              Shadowed name: 'i'
              Open

                      for (var i = src.length - 1, b0, b; i > 0; i--) {

              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 interpolators = [];

              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 indexFrom = idsFrom.indexOf(id);

              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 toEndScale = getScaleDiffFn(stableFrom, stableTo);

              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.

              Shadowed name: 'result'
              Open

                      var result = line.slice(0, (existingCount - 1) * 3 + 1);

              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 stableFrom = pointsFrom.filter(d => !d.positionIsBeingChanged);

              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 toEndScale = getScaleDiffFn(stableFrom, stableTo);

              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 idsFrom = anchorsFrom.map(d => d.id);

              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.

              Shadowed name: 'd'
              Open

                  var anchorsTo = pointsTo.filter((d, i) => i % 3 === 0);

              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.

              Shadowed name: 'd'
              Open

                  var indicesTo = idsTo.reduce((memo, id) => ((memo[id] = pointsTo.findIndex(d => d.id === id), memo)), {});

              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.

              Shadowed name: 'd'
              Open

                  pointsFrom = pointsFrom.filter(d => !d.isInterpolated);

              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.

              Shadowed name: 'd'
              Open

                  var anchorsFrom = pointsFrom.filter((d, i) => i % 3 === 0);

              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 prevIndexTo = idsTo.indexOf(remainingIds[i - 1]);

              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 stableFrom = anchorsFrom.filter(d => !d.positionIsBeingChanged);

              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.

              Shadowed name: 'd'
              Open

                  var idsTo = anchorsTo.map(d => d.id);

              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.

              Shadowed name: 'd'
              Open

                  var indicesFrom = idsFrom.reduce((memo, id) => ((memo[id] = pointsFrom.findIndex(d => d.id === id), memo)), {});

              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.

              Shadowed name: 'd'
              Open

                  var stableTo = anchorsTo.filter(d => !d.positionIsBeingChanged);

              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.

              Shadowed name: 'i'
              Open

                  var anchorsFrom = pointsFrom.filter((d, i) => i % 3 === 0);

              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.

              Shadowed name: 'a'
              Open

                  var createSimpleDiffFn = (a0, a) => (c0) => (c0 - a0 + a);

              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 toStartScale = getScaleDiffFn(stableTo, stableFrom);

              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.

              Shadowed name: 'a'
              Open

                      var a = dst[0][prop];

              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.

              Shadowed name: 'b'
              Open

                      for (var i = src.length - 1, b0, b; i > 0; i--) {

              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 remainingIds = idsFrom

              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.

              Shadowed name: 'd'
              Open

                  var stableFrom = anchorsFrom.filter(d => !d.positionIsBeingChanged);

              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.

              Shadowed name: 'result'
              Open

                      var result = line.slice(0, existingCount);

              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.

              Shadowed name: 'i'
              Open

                  remainingIds.forEach((id, i) => {

              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.

              Shadowed name: 'b'
              Open

                  var createPropDiffFn = (a0, b0, a, b) => (c0) => (

              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 indexTo = idsTo.indexOf(id);

              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 smallerPolyline = decreasing ? polylineTo : polylineFrom;

              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 points = (isCubic ? interpolateCubicEnding : interpolateEnding)({

              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 tempStartIdIndex = existingCount;

              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 result = (function getLinePiece(t, line) {

              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 i = 1, x1, y1, x0, y0, cx0, cy0, cx1, cy1, d;

              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 minSegmentPointsCount = Math.floor(biggerSegCount / smallerSegCount) + 1;

              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 segmentsPointsCount = utils.range(smallerSegCount)

              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 newC0 = Object.assign({}, smallerPolyline[smallPtIndex - 2]);

              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 a0 = src[0][prop];

              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 'decreasing' is never reassigned; use 'const' instead of 'var'.
              Open

                  var decreasing = (polylineTo.length === 1);

              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 'biggerPolyline' is never reassigned; use 'const' instead of 'var'.
              Open

                      var biggerPolyline = decreasing ? polylineFrom : polylineTo;

              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 'points' is never reassigned; use 'const' instead of 'var'.
              Open

                      var points = (isCubic ? interpolateCubicEnding : interpolateEnding)({

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                  var result = (function getLinePiece(t, line) {

              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

                          var newC1 = Object.assign({}, smallerPolyline[smallPtIndex - 1]);

              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 indexTo = indicesTo[id];

              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 decreasing = (polylineTo.length === 1);

              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 points = interpolatePoints(diffed, interpolated, (decreasing ? 1 - t : t));

              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 props = Object.keys(a);

              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 segmentsPointsCount = utils.range(smallerSegCount)

              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 'points' is never reassigned; use 'const' instead of 'var'.
              Open

                          var points = interpolator(t);

              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 'intermediate' is never reassigned; use 'const' instead of 'var'.
              Open

                      var intermediate: XPoint[] = [];

              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 'interpolators' is never reassigned; use 'const' instead of 'var'.
              Open

                  var interpolators = [];

              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 biggerPolyline = decreasing ? polylineFrom : polylineTo;

              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 'innerPointsFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                      var innerPointsFrom = polylineFrom.slice(1, polylineFrom.length - 1);

              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 'smallerSegCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var smallerSegCount = smallerPolyline.length - 1;

              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 'spl' is never reassigned; use 'const' instead of 'var'.
              Open

                          var spl = multipleSplitCubicSegment(

              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 'biggerSegCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var biggerSegCount = (biggerPolyline.length - 1) / 3;

              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 result = [smallerPolyline[0]];

              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 'createPropDiffFn' is never reassigned; use 'const' instead of 'var'.
              Open

                  var createPropDiffFn = (a0, b0, a, b) => (c0) => (

              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

                          var newPt = Object.assign({}, smallerPolyline[smallPtIndex]);

              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 smallerSegCount = (smallerPolyline.length - 1) / 3;

              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 propDiffs = {};

              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 'indexTo' is never reassigned; use 'const' instead of 'var'.
              Open

                      var indexTo = idsTo.indexOf(id);

              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 'indexFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                      var indexFrom = indicesFrom[id];

              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 'anchorsTo' is never reassigned; use 'const' instead of 'var'.
              Open

                  var anchorsTo = pointsTo.filter((d, i) => i % 3 === 0);

              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 'isLeftEnding' is never reassigned; use 'const' instead of 'var'.
              Open

                  var isLeftEnding = (polylineFrom[0].id !== polylineTo[0].id);

              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 'innerPointsTo' is never reassigned; use 'const' instead of 'var'.
              Open

                      var innerPointsTo = polylineTo.slice(1, polylineTo.length - 1);

              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 'distance' is never reassigned; use 'const' instead of 'var'.
              Open

                          var distance = [0];

              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 'newPt' is never reassigned; use 'const' instead of 'var'.
              Open

                          var newPt = Object.assign({}, smallerPolyline[smallPtIndex]);

              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 'c' is never reassigned; use 'const' instead of 'var'.
              Open

                      var c = Object.assign({}, c0);

              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 'len1' is never reassigned; use 'const' instead of 'var'.
              Open

                  var len1 = points1.length;

              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 'len2' is never reassigned; use 'const' instead of 'var'.
              Open

                  var len2 = points2.length;

              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

                                  Object.assign(
                                      {}, newPiece[2],
                                      {
                                          id: line[tempStartIdIndex + i * 3].id,
                                          isInterpolated: true

              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 isLeftEnding = (polylineFrom[0].id !== polylineTo[0].id);

              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 c = {} as XPoint;

              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 result = pointsFrom.map((a, i) => interpolatePoint(a, pointsTo[i], t));

              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 q = 0;

              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 rightToLeft = Boolean(isLeftEnding !== decreasing);

              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 qi = (q * (line.length - 1)) % 1;

              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 biggerSegCount = (biggerPolyline.length - 1) / 3;

              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 restPointsCount = biggerSegCount % smallerSegCount;

              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 'idsTo' is never reassigned; use 'const' instead of 'var'.
              Open

                  var idsTo = pointsTo.map(d => d.id);

              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 'intermediate' is never reassigned; use 'const' instead of 'var'.
              Open

                      var intermediate: XPoint[] = [];

              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 'remainingIds' is never reassigned; use 'const' instead of 'var'.
              Open

                  var remainingIds = idsFrom

              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 'toStartScale' is never reassigned; use 'const' instead of 'var'.
              Open

                  var toStartScale = getScaleDiffFn(stableTo, stableFrom);

              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 'passedDistance' is never reassigned; use 'const' instead of 'var'.
              Open

                          var passedDistance = t * totalDistance;

              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 'midPt' is never reassigned; use 'const' instead of 'var'.
              Open

                          var midPt = interpolatePoint(

              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 'passedDistance' is never reassigned; use 'const' instead of 'var'.
              Open

                          var passedDistance = t * totalDistance;

              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

                              newPt = Object.assign({}, smallerPolyline[smallPtIndex]);

              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.

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

                      var existingCount = Math.floor((pointsCount - 1) * q) + 1;

              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 qi = (q * (pointsCount - 1)) % 1;

              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 'reverse' is never reassigned; use 'const' instead of 'var'.
              Open

                  var reverse = Boolean(decreasing) !== Boolean(rightToLeft);

              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 'minSegmentPointsCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var minSegmentPointsCount = Math.floor(biggerSegCount / smallerSegCount) + 1;

              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

                      for (var i = src.length - 1, b0, b; i > 0; i--) {

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                  var result = [smallerPolyline[0]];

              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

                  for (var i = 0, t, spl; i < ts.length; i++) {

              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 'seg' is never reassigned; use 'const' instead of 'var'.
              Open

                  var seg = split(t, p0, c0, c1, p1) as XPoint[];

              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 'indexFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                      var indexFrom = idsFrom.indexOf(id);

              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 'stableFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                  var stableFrom = anchorsFrom.filter(d => !d.positionIsBeingChanged);

              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 'interpolated' is never reassigned; use 'const' instead of 'var'.
              Open

                      var interpolated = (isCubic ? interpolateCubicEnding : interpolateEnding)({

              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 'biggerInnerPoints' is never reassigned; use 'const' instead of 'var'.
              Open

                      var biggerInnerPoints = biggerPolyline.slice(1, biggerPolyline.length - 1);

              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 'decreasing' is never reassigned; use 'const' instead of 'var'.
              Open

                  var decreasing = polylineTo.length === 0;

              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 'distance' is never reassigned; use 'const' instead of 'var'.
              Open

                          var distance = [0];

              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.

              Do not use comma operator here because it can be easily misunderstood or lead to unintended bugs.
              Open

                  var indicesTo = idsTo.reduce((memo, id) => ((memo[id] = pointsTo.findIndex(d => d.id === id), memo)), {});

              Rule: ban-comma-operator

              Disallows the comma operator to be used.

              Read more about the comma operator here.

              Rationale

              Using the comma operator can create a potential for many non-obvious bugs or lead to misunderstanding of code.

              Examples

              foo((bar, baz)); // evaluates to 'foo(baz)' because of the extra parens - confusing and not obvious
              switch (foo) {
                  case 1, 2: // equals 'case 2' - probably intended 'case 1: case2:'
                      return true;
                  case 3:
                      return false;
              }
              let x = (y = 1, z = 2); // x is equal to 2 - this may not be immediately obvious.
              Examples
              "ban-comma-operator": true

              For more information see this page.

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

                  var reverse = Boolean(decreasing) !== Boolean(rightToLeft);

              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 reverse = Boolean(decreasing) !== Boolean(rightToLeft);

              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 pointsCount = (line.length - 1) / 3 + 1;

              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 existingCount = Math.floor((pointsCount - 1) * q) + 1;

              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 smallerSegCount = smallerPolyline.length - 1;

              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 'prevIndexTo' is never reassigned; use 'const' instead of 'var'.
              Open

                          var prevIndexTo = indicesTo[remainingIds[i - 1]];

              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 'newCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var newCount = polylineTo.length;

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                      var result = line.slice(0, existingCount);

              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 'newPiece' is never reassigned; use 'const' instead of 'var'.
              Open

                          var newPiece = spl.slice(1, 4);

              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 'restPointsCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var restPointsCount = biggerSegCount % smallerSegCount;

              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 'src' is never reassigned; use 'const' instead of 'var'.
              Open

                  var src = [];

              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 'propDiffs' is never reassigned; use 'const' instead of 'var'.
              Open

                  var propDiffs = {};

              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 filledPolyline = (isCubic ? fillSmallerCubicLine : fillSmallerPolyline)({

              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 rightToLeft = decreasing;

              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 distance = [0];

              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 biggerSegCount = biggerPolyline.length - 1;

              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 minSegmentPointsCount = Math.floor(biggerSegCount / smallerSegCount) + 1;

              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 result = [smallerPolyline[0]];

              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 newC1 = Object.assign({}, smallerPolyline[smallPtIndex - 1]);

              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 'stableTo' is never reassigned; use 'const' instead of 'var'.
              Open

                  var stableTo = pointsTo.filter(d => !d.positionIsBeingChanged);

              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 'toStartScale' is never reassigned; use 'const' instead of 'var'.
              Open

                  var toStartScale = getScaleDiffFn(stableTo, stableFrom);

              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 'indexTo' is never reassigned; use 'const' instead of 'var'.
              Open

                      var indexTo = indicesTo[id];

              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 'points' is never reassigned; use 'const' instead of 'var'.
              Open

                          var points = ipl(t);

              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 'indicesFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                  var indicesFrom = idsFrom.reduce((memo, id) => ((memo[id] = pointsFrom.findIndex(d => d.id === id), memo)), {});

              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 'polyline' is never reassigned; use 'const' instead of 'var'.
              Open

                  var polyline = (polylineFrom.length > polylineTo.length ? polylineFrom : polylineTo);

              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 'segmentsPointsCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var segmentsPointsCount = utils.range(smallerSegCount)

              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 points = interpolatePoints(

              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 existingCount = Math.floor((line.length - 1) * q) + 1;

              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 smallPtIndex = 3;

              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 len2 = points2.length;

              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 createPropDiffFn = (a0, b0, a, b) => (c0) => (

              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 seg = split(t, p0, c0, c1, p1) as XPoint[];

              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 'anchorsFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                  var anchorsFrom = pointsFrom.filter((d, i) => i % 3 === 0);

              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 'idsTo' is never reassigned; use 'const' instead of 'var'.
              Open

                  var idsTo = anchorsTo.map(d => d.id);

              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 'points' is never reassigned; use 'const' instead of 'var'.
              Open

                      var points = interpolatePoints(diffed, interpolated, (decreasing ? 1 - t : t));

              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 'existingCount' is never reassigned; use 'const' instead of 'var'.
              Open

                      var existingCount = Math.floor((line.length - 1) * q) + 1;

              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 'tempStartIdIndex' is never reassigned; use 'const' instead of 'var'.
              Open

                      var tempStartIdIndex = existingCount;

              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 'reverse' is never reassigned; use 'const' instead of 'var'.
              Open

                  var reverse = Boolean(decreasing) !== Boolean(rightToLeft);

              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 'minSegmentPointsCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var minSegmentPointsCount = Math.floor(biggerSegCount / smallerSegCount) + 1;

              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 'numProps' is never reassigned; use 'const' instead of 'var'.
              Open

                  var numProps = Object.keys(src[0])

              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 'createSimpleDiffFn' is never reassigned; use 'const' instead of 'var'.
              Open

                  var createSimpleDiffFn = (a0, a) => (c0) => (c0 - a0 + a);

              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

                  var c = {} as XPoint;

              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.

              Use the object spread operator instead.
              Open

                          var newC0 = Object.assign({}, smallerPolyline[smallPtIndex - 2]);

              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 c = Object.assign({}, c0);

              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 toStartScale = getScaleDiffFn(stableTo, stableFrom);

              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 decreasing = polylineTo.length === 0;

              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

                          for (var i = 1, x, y, x0, y0, d; i < line.length; i++) {

              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 q = 0;

              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 numProps = Object.keys(src[0])

              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 'toEndScale' is never reassigned; use 'const' instead of 'var'.
              Open

                  var toEndScale = getScaleDiffFn(stableFrom, stableTo);

              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 'points' is never reassigned; use 'const' instead of 'var'.
              Open

                          var points = interpolatePoints(

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                  var result = pointsFrom.map((a, i) => interpolatePoint(a, pointsTo[i], t));

              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 'tempCount' is never reassigned; use 'const' instead of 'var'.
              Open

                      var tempCount = line.length - existingCount;

              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 points = ipl(t);

              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 interpolated = (isCubic ? interpolateCubicEnding : interpolateEnding)({

              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 polyline = (decreasing ? polylineFrom : polylineTo);

              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 result = (function getLinePiece(t, line) {

              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 result = line.slice(0, existingCount);

              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 distance = [0];

              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 spl = multipleSplitCubicSegment(

              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 src = [];

              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 len1 = points1.length;

              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 'remainingIds' is never reassigned; use 'const' instead of 'var'.
              Open

                  var remainingIds = idsFrom

              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 'decreasing' is never reassigned; use 'const' instead of 'var'.
              Open

                      var decreasing = newCount < oldCount;

              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 'filledPolyline' is never reassigned; use 'const' instead of 'var'.
              Open

                      var filledPolyline = (isCubic ? fillSmallerCubicLine : fillSmallerPolyline)({

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                      var result = line.slice(0, (existingCount - 1) * 3 + 1);

              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 'spl' is never reassigned; use 'const' instead of 'var'.
              Open

                          var spl = splitCubicSegment(

              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

                          push(result, utils.range(tempCount).map((i) => Object.assign(
                              {}, midPt,
                              {
                                  id: line[tempStartIdIndex + i].id,
                                  isInterpolated: true

              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.

              Do not use comma operator here because it can be easily misunderstood or lead to unintended bugs.
              Open

                  var indicesFrom = idsFrom.reduce((memo, id) => ((memo[id] = pointsFrom.findIndex(d => d.id === id), memo)), {});

              Rule: ban-comma-operator

              Disallows the comma operator to be used.

              Read more about the comma operator here.

              Rationale

              Using the comma operator can create a potential for many non-obvious bugs or lead to misunderstanding of code.

              Examples

              foo((bar, baz)); // evaluates to 'foo(baz)' because of the extra parens - confusing and not obvious
              switch (foo) {
                  case 1, 2: // equals 'case 2' - probably intended 'case 1: case2:'
                      return true;
                  case 3:
                      return false;
              }
              let x = (y = 1, z = 2); // x is equal to 2 - this may not be immediately obvious.
              Examples
              "ban-comma-operator": true

              For more information see this page.

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

                  var interpolators = [];

              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 prevIndexFrom = indicesFrom[remainingIds[i - 1]];

              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 diffed = interpolated.map(toOppositeScale);

              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 newCount = polylineTo.length;

              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 filledInnerPoints = filledPolyline.slice(1, filledPolyline.length - 1);

              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 innerPointsTo = polylineTo.slice(1, polylineTo.length - 1);

              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 totalDistance = 0;

              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 passedDistance = t * totalDistance;

              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 spl = splitCubicSegment(

              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 c = Object.assign({}, c0);

              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 'prevIndexFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                          var prevIndexFrom = indicesFrom[remainingIds[i - 1]];

              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 'polyline' is never reassigned; use 'const' instead of 'var'.
              Open

                  var polyline = (decreasing ? polylineFrom : polylineTo);

              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 'c' is never reassigned; use 'const' instead of 'var'.
              Open

                  var c = {} as XPoint;

              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 'biggerSegCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var biggerSegCount = biggerPolyline.length - 1;

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                  var result = [smallerPolyline[0]];

              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 totalDistance = 0;

              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 restPointsCount = biggerSegCount % smallerSegCount;

              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 decreasing = newCount < oldCount;

              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 createSimpleDiffFn = (a0, a) => (c0) => (c0 - a0 + a);

              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 'toEndScale' is never reassigned; use 'const' instead of 'var'.
              Open

                  var toEndScale = getScaleDiffFn(stableFrom, stableTo);

              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 points = interpolatePoints(

              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 'rightToLeft' is never reassigned; use 'const' instead of 'var'.
              Open

                  var rightToLeft = Boolean(isLeftEnding !== decreasing);

              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 'newC0' is never reassigned; use 'const' instead of 'var'.
              Open

                          var newC0 = Object.assign({}, smallerPolyline[smallPtIndex - 2]);

              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 'newC1' is never reassigned; use 'const' instead of 'var'.
              Open

                          var newC1 = Object.assign({}, smallerPolyline[smallPtIndex - 1]);

              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 midPt = interpolatePoint(

              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 'segmentsPointsCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var segmentsPointsCount = utils.range(smallerSegCount)

              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 'dst' is never reassigned; use 'const' instead of 'var'.
              Open

                  var dst = [];

              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 tempCount = pointsCount - existingCount;

              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 result = line.slice(0, (existingCount - 1) * 3 + 1);

              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 newPt;

              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 result = [seg[0]];

              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.

              Multiple variable declarations in the same statement are forbidden
              Open

                  var i, j, a, b, matchJ = 0;

              Rule: one-variable-per-declaration

              Disallows multiple variable definitions in the same declaration statement.

              Config

              One argument may be optionally provided:

              • ignore-for-loop allows multiple variable definitions in a for loop declaration.
              Examples
              "one-variable-per-declaration": true
              "one-variable-per-declaration": true,ignore-for-loop
              Schema
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ignore-for-loop"
                  ]
                },
                "minLength": 0,
                "maxLength": 1
              }

              For more information see this page.

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

                  var idsFrom = anchorsFrom.map(d => d.id);

              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 'rightToLeft' is never reassigned; use 'const' instead of 'var'.
              Open

                  var rightToLeft = decreasing;

              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 'qi' is never reassigned; use 'const' instead of 'var'.
              Open

                          var qi = (q * (line.length - 1)) % 1;

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                  var result = (function getLinePiece(t, line) {

              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 'tempStartIdIndex' is never reassigned; use 'const' instead of 'var'.
              Open

                      var tempStartIdIndex = existingCount * 3;

              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 'a0' is never reassigned; use 'const' instead of 'var'.
              Open

                      var a0 = src[0][prop];

              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 'result' is never reassigned; use 'const' instead of 'var'.
              Open

                  var result = [seg[0]];

              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 indexFrom = indicesFrom[id];

              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 intermediate: XPoint[] = [];

              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 prevIndexTo = indicesTo[remainingIds[i - 1]];

              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 polyline = (polylineFrom.length > polylineTo.length ? polylineFrom : polylineTo);

              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 oldCount = polylineFrom.length;

              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 passedDistance = t * totalDistance;

              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 biggerInnerPoints = biggerPolyline.slice(1, biggerPolyline.length - 1);

              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 smallPtIndex = 1;

              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 innerPointsFrom = polylineFrom.slice(1, polylineFrom.length - 1);

              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 newPt = Object.assign({}, smallerPolyline[smallPtIndex]);

              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 tempCount = line.length - existingCount;

              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 i, j, a, b, matchJ = 0;

              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 tempStartIdIndex = existingCount * 3;

              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 newPiece = spl.slice(1, 4);

              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.

              Multiple variable declarations in the same statement are forbidden
              Open

                  var d, p;

              Rule: one-variable-per-declaration

              Disallows multiple variable definitions in the same declaration statement.

              Config

              One argument may be optionally provided:

              • ignore-for-loop allows multiple variable definitions in a for loop declaration.
              Examples
              "one-variable-per-declaration": true
              "one-variable-per-declaration": true,ignore-for-loop
              Schema
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ignore-for-loop"
                  ]
                },
                "minLength": 0,
                "maxLength": 1
              }

              For more information see this page.

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

                  var dst = [];

              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 'stableFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                  var stableFrom = pointsFrom.filter(d => !d.positionIsBeingChanged);

              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 a = dst[0][prop];

              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 'indicesTo' is never reassigned; use 'const' instead of 'var'.
              Open

                  var indicesTo = idsTo.reduce((memo, id) => ((memo[id] = pointsTo.findIndex(d => d.id === id), memo)), {});

              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 'prevIndexFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                          var prevIndexFrom = idsFrom.indexOf(remainingIds[i - 1]);

              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 'prevIndexTo' is never reassigned; use 'const' instead of 'var'.
              Open

                          var prevIndexTo = idsTo.indexOf(remainingIds[i - 1]);

              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 'diffed' is never reassigned; use 'const' instead of 'var'.
              Open

                      var diffed = interpolated.map(toOppositeScale);

              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 'points' is never reassigned; use 'const' instead of 'var'.
              Open

                          var points = interpolatePoints(

              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 'idsFrom' is never reassigned; use 'const' instead of 'var'.
              Open

                  var idsFrom = pointsFrom.map(d => d.id);

              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 'oldCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var oldCount = polylineFrom.length;

              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 'interpolators' is never reassigned; use 'const' instead of 'var'.
              Open

                  var interpolators = [];

              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 'stableTo' is never reassigned; use 'const' instead of 'var'.
              Open

                  var stableTo = anchorsTo.filter(d => !d.positionIsBeingChanged);

              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 'smallerPolyline' is never reassigned; use 'const' instead of 'var'.
              Open

                      var smallerPolyline = decreasing ? polylineTo : polylineFrom;

              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 'filledInnerPoints' is never reassigned; use 'const' instead of 'var'.
              Open

                      var filledInnerPoints = filledPolyline.slice(1, filledPolyline.length - 1);

              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 'pointsCount' is never reassigned; use 'const' instead of 'var'.
              Open

                      var pointsCount = (line.length - 1) / 3 + 1;

              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 'props' is never reassigned; use 'const' instead of 'var'.
              Open

                  var props = Object.keys(a);

              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 'tempCount' is never reassigned; use 'const' instead of 'var'.
              Open

                      var tempCount = pointsCount - existingCount;

              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 'qi' is never reassigned; use 'const' instead of 'var'.
              Open

                          var qi = (q * (pointsCount - 1)) % 1;

              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 'restPointsCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var restPointsCount = biggerSegCount % smallerSegCount;

              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 'smallerSegCount' is never reassigned; use 'const' instead of 'var'.
              Open

                  var smallerSegCount = (smallerPolyline.length - 1) / 3;

              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 'a' is never reassigned; use 'const' instead of 'var'.
              Open

                      var a = dst[0][prop];

              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