yannickwurm/sequenceserver

View on GitHub
public/packages/circosJS@1.7.0.js

Summary

Maintainability
F
1 mo
Test Coverage

File circosJS@1.7.0.js has 1590 lines of code (exceeds 1000 allowed). Consider refactoring.
Open

var circosJS,
    indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

if (typeof Object.assign !== 'function') {
    Object.assign = function(target) {
Severity: Major
Found in public/packages/circosJS@1.7.0.js - About 2 days to fix

    Function Track has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
    Open

    circosJS.Track = function() {
        this.build = function(instance, conf, data) {
            this.dispatch = d3.dispatch('mouseover', 'mouseout');
            this.loadData(data, instance);
            this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
    Severity: Minor
    Found in public/packages/circosJS@1.7.0.js - About 1 day 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 Track has 214 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    circosJS.Track = function() {
        this.build = function(instance, conf, data) {
            this.dispatch = d3.dispatch('mouseover', 'mouseout');
            this.loadData(data, instance);
            this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
    Severity: Major
    Found in public/packages/circosJS@1.7.0.js - About 1 day to fix

      Function Stack has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
      Open

      circosJS.Stack = function() {
          circosJS.Track.call(this);
          this.parseData = circosJS.parseSpanValueData;
          this.build = function(instance, conf, data, rules, backgrounds) {
              this.loadData(data, instance);
      Severity: Minor
      Found in public/packages/circosJS@1.7.0.js - About 1 day 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 Stack has 158 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      circosJS.Stack = function() {
          circosJS.Track.call(this);
          this.parseData = circosJS.parseSpanValueData;
          this.build = function(instance, conf, data, rules, backgrounds) {
              this.loadData(data, instance);
      Severity: Major
      Found in public/packages/circosJS@1.7.0.js - About 6 hrs to fix

        Function Chord has 108 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        circosJS.Chord = function() {
            circosJS.Track.call(this);
            this.parseData = circosJS.parseChordData;
            this.applyRules = function(rules, data) {
                var datum, l, len, results, rule;
        Severity: Major
        Found in public/packages/circosJS@1.7.0.js - About 4 hrs to fix

          Function renderLayoutTicks has 74 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          circosJS.renderLayoutTicks = function(conf, layout, d3, instance) {
              var blockTicks, displayLabel, ticks;
              blockTicks = function(d) {
                  var k,space;
                  k = (d.end - d.start) / d.len;
          Severity: Major
          Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

            Function removeTracks has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

            circosJS.Core.prototype.removeTracks = function(trackIds) {
                var id, l, len, ref, store, svg, trackId, type;
                svg = d3.select(this.conf.container);
                ref = this.tracks;
                for (type in ref) {
            Severity: Minor
            Found in public/packages/circosJS@1.7.0.js - 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 Layout has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            circosJS.Layout = function(conf, data) {
                var block_nb, gap, k, offset, ref, ref1, size, v;
                if (data == null) {
                    circosJS.log(2, 'no layout data', '');
                }
            Severity: Major
            Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

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

              circosJS.Core.prototype.render = function(ids, removeTracks) {
                  var name, ref, ref1, renderAll, svg, track, trackStore, trackType, tracks, translated;
                  if (typeof ids === 'undefined') {
                      renderAll = true;
                      ids = [];
              Severity: Minor
              Found in public/packages/circosJS@1.7.0.js - 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 assign has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

                  Object.assign = function(target) {
                      'use strict';
                      var index, key, source;
                      if (target === null) {
                          throw new TypeError('Cannot convert undefined or null to object');
              Severity: Minor
              Found in public/packages/circosJS@1.7.0.js - 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 parseSpanValueData has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              circosJS.parseSpanValueData = function(data, layoutSummary) {
                  var groups, sample;
                  if (!(data.length > 0)) {
                      return {
                          data: [],
              Severity: Major
              Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

                Function parseChordData has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                circosJS.parseChordData = function(data, layoutSummary) {
                    var sample;
                    sample = data[0];
                    if ('source_id' in sample && 'source_start' in sample && 'source_end' && 'target_id' in sample && 'target_start' in sample && 'target_end' in sample) {
                        data = data.map(function(datum) {
                Severity: Major
                Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

                  Function smartBorders has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  circosJS.Core.prototype.smartBorders = function() {
                      var border, borders, currentBorder, l, layout, len, ref, store, track, trackId, trackType, width;
                      width = this.conf.defaultTrackWidth;
                      layout = {
                          'in': this._layout.conf.innerRadius,
                  Severity: Major
                  Found in public/packages/circosJS@1.7.0.js - About 2 hrs to fix

                    Function mixConf has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    circosJS.mixConf = function(conf, defaultConf) {
                        var key, newConf, value;
                        newConf = {};
                        for (key in defaultConf) {
                            value = defaultConf[key];
                    Severity: Minor
                    Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                    Cognitive Complexity

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

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

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

                    Further reading

                    Function render has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    circosJS.Core.prototype.render = function(ids, removeTracks) {
                        var name, ref, ref1, renderAll, svg, track, trackStore, trackType, tracks, translated;
                        if (typeof ids === 'undefined') {
                            renderAll = true;
                            ids = [];
                    Severity: Minor
                    Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                      Function Histogram has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      circosJS.Histogram = function() {
                          circosJS.Track.call(this);
                          this.parseData = circosJS.parseSpanValueData;
                          this.renderDatumContainer = (function(_this) {
                              return function(instance, parentElement, name, data, conf) {
                      Severity: Minor
                      Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                        Function parseSpanStringData has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        circosJS.parseSpanStringData = function(data, layoutSummary) {
                            var groups, sample;
                            sample = data[0];
                            if ('parent_id' in sample && 'start' in sample && 'end' in sample && 'value' in sample) {
                                data = data.map(function(datum) {
                        Severity: Minor
                        Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                          Function buildLayers has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              this.buildLayers = function(data, margin) {
                                  var block, datum, i, idx, l, lastDatumInLayer, layer, layers, len, len1, m, placed, ref;
                                  for (idx in data) {
                                      block = data[idx];
                                      block.values = block.values.sort(function(a, b) {
                          Severity: Minor
                          Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                this.applyRules = function(rules, data) {
                                    var datum, i, k, layer, results, rule, v;
                                    rules = rules || [];
                                    results = [];
                                    for (k in data) {
                            Severity: Minor
                            Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                              Function Line has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              circosJS.Line = function() {
                                  circosJS.Track.call(this);
                                  this.parseData = circosJS.parsePositionValueData;
                                  this.renderDatumContainer = (function(_this) {
                                      return function(instance, parentElement, name, data, conf) {
                              Severity: Minor
                              Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                Function Scatter has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                circosJS.Scatter = function() {
                                    circosJS.Track.call(this);
                                    this.parseData = circosJS.parsePositionValueData;
                                    this.renderDatumContainer = (function(_this) {
                                        return function(instance, parentElement, name, data, conf) {
                                Severity: Minor
                                Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                  Function Chord has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  circosJS.Chord = function() {
                                      circosJS.Track.call(this);
                                      this.parseData = circosJS.parseChordData;
                                      this.applyRules = function(rules, data) {
                                          var datum, l, len, results, rule;
                                  Severity: Minor
                                  Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

                                  Function parsePositionValueData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  circosJS.parsePositionValueData = function(data, layoutSummary) {
                                      var groups, sample;
                                      sample = data[0];
                                      if ('parent_id' in sample && 'position' in sample) {
                                          data = data.map(function(datum) {
                                  Severity: Minor
                                  Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                    Function renderDatum has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        this.renderDatum = function(parentElement, conf, layout, utils) {
                                            var bin;
                                            bin = parentElement.selectAll('.bin').data(function(d) {
                                                return d.values;
                                            }).enter().append('path').attr('class', 'bin').attr('opacity', function(d) {
                                    Severity: Minor
                                    Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                      Function parsePositionTextData has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      circosJS.parsePositionTextData = function(data, layoutSummary) {
                                          var groups, sample;
                                          sample = data[0];
                                          if ('parent_id' in sample && 'position' in sample) {
                                              data = data.map(function(datum) {
                                      Severity: Minor
                                      Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                        Function renderAxes has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            this.renderAxes = function(parentElement, conf, layout, data) {
                                                var axes, axis, x;
                                                if (conf.axes.minor.spacingType === 'pixel') {
                                                    axes = (function() {
                                                        var l, ref, ref1, ref2, results;
                                        Severity: Minor
                                        Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                          circosJS.Core.prototype.smartBorders = function() {
                                              var border, borders, currentBorder, l, layout, len, ref, store, track, trackId, trackType, width;
                                              width = this.conf.defaultTrackWidth;
                                              layout = {
                                                  'in': this._layout.conf.innerRadius,
                                          Severity: Minor
                                          Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                          Cognitive Complexity

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

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

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

                                          Further reading

                                          Function renderChords has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              this.renderChords = function(parentElement, name, conf, data, layout, ratio, getSource, getTarget) {
                                                  var link, track;
                                                  track = parentElement.append('g').attr('class', conf.colorPalette);
                                                  link = track.selectAll('.chord').data(data).enter().append('path').attr('class', 'chord').attr('d', d3.svg.chord().source(function(d) {
                                                      return getSource(d, layout);
                                          Severity: Minor
                                          Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                                this.renderBlock = function(parentElement, data, layout, conf) {
                                                    var block, scope;
                                                    scope = conf.outerRadius - conf.innerRadius;
                                                    block = parentElement.selectAll('.block').data(data).enter().append('g').attr('class', 'block').attr('transform', function(d) {
                                                        return 'rotate(' + layout.blocks[d.key].start * 360 / (2 * Math.PI) + ')';
                                            Severity: Minor
                                            Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                                  this.applyRules = function(rules, data) {
                                                      var datum, i, k, results, rule, v;
                                                      rules = rules || [];
                                                      results = [];
                                                      for (k in data) {
                                              Severity: Minor
                                              Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                                    this.renderDatum = function(parentElement, conf, layout, utils) {
                                                        var tile;
                                                        tile = parentElement.selectAll('.tile').data(function(d) {
                                                            return d.values;
                                                        }).enter().append('path').attr('class', 'tile').attr('d', d3.svg.arc().innerRadius(utils.datumInnerRadius).outerRadius(utils.datumOuterRadius).startAngle(function(d) {
                                                Severity: Minor
                                                Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                                  circosJS.Text = function() {
                                                      circosJS.Track.call(this);
                                                      this.parseData = circosJS.parsePositionTextData;
                                                      this.renderDatumContainer = (function(_this) {
                                                          return function(instance, parentElement, name, data, conf) {
                                                  Severity: Minor
                                                  Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                                    circosJS.Core.prototype.removeTracks = function(trackIds) {
                                                        var id, l, len, ref, store, svg, trackId, type;
                                                        svg = d3.select(this.conf.container);
                                                        ref = this.tracks;
                                                        for (type in ref) {
                                                    Severity: Minor
                                                    Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                                      circosJS.Highlight = function() {
                                                          circosJS.Track.call(this);
                                                          this.parseData = circosJS.parseSpanStringData;
                                                          this.renderDatumContainer = (function(_this) {
                                                              return function(instance, parentElement, name, data, conf) {
                                                      Severity: Minor
                                                      Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

                                                        Function renderChords has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            this.renderChords = function(parentElement, name, conf, data, layout, ratio, getSource, getTarget) {
                                                        Severity: Major
                                                        Found in public/packages/circosJS@1.7.0.js - About 1 hr to fix

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

                                                          circosJS.Layout = function(conf, data) {
                                                              var block_nb, gap, k, offset, ref, ref1, size, v;
                                                              if (data == null) {
                                                                  circosJS.log(2, 'no layout data', '');
                                                              }
                                                          Severity: Minor
                                                          Found in public/packages/circosJS@1.7.0.js - 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

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                      for (trackId in store) {
                                                                          svg.select('.' + trackId).remove();
                                                                          delete store[trackId];
                                                                      }
                                                          Severity: Major
                                                          Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

                                                            Function ratio has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                this.ratio = function(value, min, max, scope, reverse, logScale) {
                                                            Severity: Minor
                                                            Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                                  if (rule.condition(v.parent, datum, i)) {
                                                                                                      results3.push(datum[rule.parameter] = rule.value);
                                                                                                  } else {
                                                                                                      results3.push(void 0);
                                                                                                  }
                                                              Severity: Major
                                                              Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

                                                                Function ratio has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                    this.ratio = function(value, min, max, scope, reverse, logScale) {
                                                                Severity: Minor
                                                                Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                      if (Object.prototype.hasOwnProperty.call(source, key)) {
                                                                                          target[key] = source[key];
                                                                                      }
                                                                  Severity: Major
                                                                  Found in public/packages/circosJS@1.7.0.js - About 45 mins to fix

                                                                    Consider simplifying this complex logical expression.
                                                                    Open

                                                                        if ('source_id' in sample && 'source_start' in sample && 'source_end' && 'target_id' in sample && 'target_start' in sample && 'target_end' in sample) {
                                                                            data = data.map(function(datum) {
                                                                                var elts;
                                                                                elts = [datum.source_id, datum.source_start, datum.source_end, datum.target_id, datum.target_start, datum.target_end];
                                                                                if (datum.value != null) {
                                                                    Severity: Major
                                                                    Found in public/packages/circosJS@1.7.0.js - About 40 mins to fix

                                                                      Function build has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                          this.build = function(instance, conf, data, rules, backgrounds) {
                                                                      Severity: Minor
                                                                      Found in public/packages/circosJS@1.7.0.js - About 35 mins to fix

                                                                        Function processConf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                            this.processConf = function(conf, defaultConf, meta, instance, utils) {
                                                                        Severity: Minor
                                                                        Found in public/packages/circosJS@1.7.0.js - About 35 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                      return v / conf.ticks.labelDenominator + conf.ticks.labelSuffix;
                                                                          Severity: Major
                                                                          Found in public/packages/circosJS@1.7.0.js - About 30 mins to fix

                                                                            Unexpected console statement.
                                                                            Open

                                                                                console.log('CircosJS: ', levels[level] + ' [' + code + '] ', message, data);
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            disallow the use of console (no-console)

                                                                            In JavaScript that is designed to be executed in the browser, it's considered a best practice to avoid using methods on console. Such messages are considered to be for debugging purposes and therefore not suitable to ship to the client. In general, calls using console should be stripped before being pushed to production.

                                                                            console.log("Made it here.");
                                                                            console.error("That shouldn't have happened.");

                                                                            Rule Details

                                                                            This rule disallows calls to methods of the console object.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-console: "error"*/
                                                                            
                                                                            console.log("Log a debug level message.");
                                                                            console.warn("Log a warn level message.");
                                                                            console.error("Log an error level message.");

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-console: "error"*/
                                                                            
                                                                            // custom console
                                                                            Console.log("Hello world!");

                                                                            Options

                                                                            This rule has an object option for exceptions:

                                                                            • "allow" has an array of strings which are allowed methods of the console object

                                                                            Examples of additional correct code for this rule with a sample { "allow": ["warn", "error"] } option:

                                                                            /*eslint no-console: ["error", { allow: ["warn", "error"] }] */
                                                                            
                                                                            console.warn("Log a warn level message.");
                                                                            console.error("Log an error level message.");

                                                                            When Not To Use It

                                                                            If you're using Node.js, however, console is used to output information to the user and so is not strictly used for debugging purposes. If you are developing for Node.js then you most likely do not want this rule enabled.

                                                                            Related Rules

                                                                            'group' is assigned a value but never used.
                                                                            Open

                                                                                        var group, track;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'group' is assigned a value but never used.
                                                                            Open

                                                                                        var group, track;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'd' is not defined.
                                                                            Open

                                                                                        bin.attr('fill', d.color || conf.color);
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Undeclared Variables (no-undef)

                                                                            This rule can help you locate potential ReferenceErrors resulting from misspellings of variable and parameter names, or accidental implicit globals (for example, from forgetting the var keyword in a for loop initializer).

                                                                            Rule Details

                                                                            Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a /*global ...*/ comment.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-undef: "error"*/
                                                                            
                                                                            var a = someFunction();
                                                                            b = 10;

                                                                            Examples of correct code for this rule with global declaration:

                                                                            /*global someFunction b:true*/
                                                                            /*eslint no-undef: "error"*/
                                                                            
                                                                            var a = someFunction();
                                                                            b = 10;

                                                                            The b:true syntax in /*global */ indicates that assignment to b is correct.

                                                                            Examples of incorrect code for this rule with global declaration:

                                                                            /*global b*/
                                                                            /*eslint no-undef: "error"*/
                                                                            
                                                                            b = 10;

                                                                            By default, variables declared in /*global */ are read-only, therefore assignment is incorrect.

                                                                            Options

                                                                            • typeof set to true will warn for variables used inside typeof check (Default false).

                                                                            typeof

                                                                            Examples of correct code for the default { "typeof": false } option:

                                                                            /*eslint no-undef: "error"*/
                                                                            
                                                                            if (typeof UndefinedIdentifier === "undefined") {
                                                                                // do something ...
                                                                            }

                                                                            You can use this option if you want to prevent typeof check on a variable which has not been declared.

                                                                            Examples of incorrect code for the { "typeof": true } option:

                                                                            /*eslint no-undef: ["error", { "typeof": true }] */
                                                                            
                                                                            if(typeof a === "string"){}

                                                                            Examples of correct code for the { "typeof": true } option with global declaration:

                                                                            /*global a*/
                                                                            /*eslint no-undef: ["error", { "typeof": true }] */
                                                                            
                                                                            if(typeof a === "string"){}

                                                                            Environments

                                                                            For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in Specifying Environments. A few examples are given below.

                                                                            browser

                                                                            Examples of correct code for this rule with browser environment:

                                                                            /*eslint no-undef: "error"*/
                                                                            /*eslint-env browser*/
                                                                            
                                                                            setTimeout(function() {
                                                                                alert("Hello");
                                                                            });

                                                                            node

                                                                            Examples of correct code for this rule with node environment:

                                                                            /*eslint no-undef: "error"*/
                                                                            /*eslint-env node*/
                                                                            
                                                                            var fs = require("fs");
                                                                            module.exports = function() {
                                                                                console.log(fs);
                                                                            };

                                                                            When Not To Use It

                                                                            If explicit declaration of global variables is not to your taste.

                                                                            Compatibility

                                                                            This rule provides compatibility with treatment of global variables in JSHint and JSLint. Source: http://eslint.org/docs/rules/

                                                                            'group' is assigned a value but never used.
                                                                            Open

                                                                                        var group, track;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'item' is already defined.
                                                                            Open

                                                                                    var item = {
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            disallow variable redeclaration (no-redeclare)

                                                                            In JavaScript, it's possible to redeclare the same variable name using var. This can lead to confusion as to where the variable is actually declared and initialized.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating variables that have multiple declarations in the same scope.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-redeclare: "error"*/
                                                                            
                                                                            var a = 3;
                                                                            var a = 10;

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-redeclare: "error"*/
                                                                            
                                                                            var a = 3;
                                                                            // ...
                                                                            a = 10;

                                                                            Options

                                                                            This rule takes one optional argument, an object with a boolean property "builtinGlobals". It defaults to false. If set to true, this rule also checks redeclaration of built-in globals, such as Object, Array, Number...

                                                                            builtinGlobals

                                                                            Examples of incorrect code for the { "builtinGlobals": true } option:

                                                                            /*eslint no-redeclare: ["error", { "builtinGlobals": true }]*/
                                                                            
                                                                            var Object = 0;

                                                                            Examples of incorrect code for the { "builtinGlobals": true } option and the browser environment:

                                                                            /*eslint no-redeclare: ["error", { "builtinGlobals": true }]*/
                                                                            /*eslint-env browser*/
                                                                            
                                                                            var top = 0;

                                                                            The browser environment has many built-in global variables (for example, top). Some of built-in global variables cannot be redeclared. Source: http://eslint.org/docs/rules/

                                                                            'ref' is assigned a value but never used.
                                                                            Open

                                                                                            var l, ref, ref1, ref2, results;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'result' is assigned a value but never used.
                                                                            Open

                                                                                        var block, endAngle, result, startAngle;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'group' is assigned a value but never used.
                                                                            Open

                                                                                        var group;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            Duplicate key 'color'.
                                                                            Open

                                                                                color: '#fd6a62',
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            disallow duplicate keys in object literals (no-dupe-keys)

                                                                            Multiple properties with the same key in object literals can cause unexpected behavior in your application.

                                                                            var foo = {
                                                                                bar: "baz",
                                                                                bar: "qux"
                                                                            };

                                                                            Rule Details

                                                                            This rule disallows duplicate keys in object literals.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-dupe-keys: "error"*/
                                                                            
                                                                            var foo = {
                                                                                bar: "baz",
                                                                                bar: "qux"
                                                                            };
                                                                            
                                                                            var foo = {
                                                                                "bar": "baz",
                                                                                bar: "qux"
                                                                            };
                                                                            
                                                                            var foo = {
                                                                                0x1: "baz",
                                                                                1: "qux"
                                                                            };

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-dupe-keys: "error"*/
                                                                            
                                                                            var foo = {
                                                                                bar: "baz",
                                                                                quxx: "qux"
                                                                            };

                                                                            Source: http://eslint.org/docs/rules/

                                                                            'group' is assigned a value but never used.
                                                                            Open

                                                                                        var group, track;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            Empty block statement.
                                                                            Open

                                                                                        if ((final - init) > 0.5) {
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            disallow empty block statements (no-empty)

                                                                            Empty block statements, while not technically errors, usually occur due to refactoring that wasn't completed. They can cause confusion when reading code.

                                                                            Rule Details

                                                                            This rule disallows empty block statements. This rule ignores block statements which contain a comment (for example, in an empty catch or finally block of a try statement to indicate that execution should continue regardless of errors).

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-empty: "error"*/
                                                                            
                                                                            if (foo) {
                                                                            }
                                                                            
                                                                            while (foo) {
                                                                            }
                                                                            
                                                                            switch(foo) {
                                                                            }
                                                                            
                                                                            try {
                                                                                doSomething();
                                                                            } catch(ex) {
                                                                            
                                                                            } finally {
                                                                            
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-empty: "error"*/
                                                                            
                                                                            if (foo) {
                                                                                // empty
                                                                            }
                                                                            
                                                                            while (foo) {
                                                                                /* empty */
                                                                            }
                                                                            
                                                                            try {
                                                                                doSomething();
                                                                            } catch (ex) {
                                                                                // continue regardless of error
                                                                            }
                                                                            
                                                                            try {
                                                                                doSomething();
                                                                            } finally {
                                                                                /* continue regardless of error */
                                                                            }

                                                                            Options

                                                                            This rule has an object option for exceptions:

                                                                            • "allowEmptyCatch": true allows empty catch clauses (that is, which do not contain a comment)

                                                                            allowEmptyCatch

                                                                            Examples of additional correct code for this rule with the { "allowEmptyCatch": true } option:

                                                                            /* eslint no-empty: ["error", { "allowEmptyCatch": true }] */
                                                                            try {
                                                                                doSomething();
                                                                            } catch (ex) {}
                                                                            
                                                                            try {
                                                                                doSomething();
                                                                            }
                                                                            catch (ex) {}
                                                                            finally {
                                                                                /* continue regardless of error */
                                                                            }

                                                                            When Not To Use It

                                                                            If you intentionally use empty block statements then you can disable this rule.

                                                                            Related Rules

                                                                            'result' is assigned a value but never used.
                                                                            Open

                                                                                        var block, endAngle, result, startAngle;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'group' is assigned a value but never used.
                                                                            Open

                                                                                        var group, track;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'displayLabel' is assigned a value but never used.
                                                                            Open

                                                                                var blockTicks, displayLabel, ticks;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

                                                                            'group' is assigned a value but never used.
                                                                            Open

                                                                                        var group, track;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js by eslint

                                                                            Disallow Unused Variables (no-unused-vars)

                                                                            Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring. Such variables take up space in the code and can lead to confusion by readers.

                                                                            Rule Details

                                                                            This rule is aimed at eliminating unused variables, functions, and parameters of functions.

                                                                            A variable is considered to be used if any of the following are true:

                                                                            • It represents a function that is called (doSomething())
                                                                            • It is read (var y = x)
                                                                            • It is passed into a function as an argument (doSomething(x))
                                                                            • It is read inside of a function that is passed to another function (doSomething(function() { foo(); }))

                                                                            A variable is not considered to be used if it is only ever assigned to (var x = 5) or declared.

                                                                            Examples of incorrect code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            /*global some_unused_var*/
                                                                            
                                                                            // It checks variables you have defined as global
                                                                            some_unused_var = 42;
                                                                            
                                                                            var x;
                                                                            
                                                                            // Write-only variables are not considered as used.
                                                                            var y = 10;
                                                                            y = 5;
                                                                            
                                                                            // A read for a modification of itself is not considered as used.
                                                                            var z = 0;
                                                                            z = z + 1;
                                                                            
                                                                            // By default, unused arguments cause warnings.
                                                                            (function(foo) {
                                                                                return 5;
                                                                            })();
                                                                            
                                                                            // Unused recursive functions also cause warnings.
                                                                            function fact(n) {
                                                                                if (n < 2) return 1;
                                                                                return n * fact(n - 1);
                                                                            }
                                                                            
                                                                            // When a function definition destructures an array, unused entries from the array also cause warnings.
                                                                            function getY([x, y]) {
                                                                                return y;
                                                                            }

                                                                            Examples of correct code for this rule:

                                                                            /*eslint no-unused-vars: "error"*/
                                                                            
                                                                            var x = 10;
                                                                            alert(x);
                                                                            
                                                                            // foo is considered used here
                                                                            myFunc(function foo() {
                                                                                // ...
                                                                            }.bind(this));
                                                                            
                                                                            (function(foo) {
                                                                                return foo;
                                                                            })();
                                                                            
                                                                            var myFunc;
                                                                            myFunc = setTimeout(function() {
                                                                                // myFunc is considered used
                                                                                myFunc();
                                                                            }, 50);
                                                                            
                                                                            // Only the second argument from the descructured array is used.
                                                                            function getY([, y]) {
                                                                                return y;
                                                                            }

                                                                            exported

                                                                            In environments outside of CommonJS or ECMAScript modules, you may use var to create a global variable that may be used by other scripts. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.

                                                                            Note that /* exported */ has no effect for any of the following:

                                                                            • when the environment is node or commonjs
                                                                            • when parserOptions.sourceType is module
                                                                            • when ecmaFeatures.globalReturn is true

                                                                            The line comment // exported variableName will not work as exported is not line-specific.

                                                                            Examples of correct code for /* exported variableName */ operation:

                                                                            /* exported global_var */
                                                                            
                                                                            var global_var = 42;

                                                                            Options

                                                                            This rule takes one argument which can be a string or an object. The string settings are the same as those of the vars property (explained below).

                                                                            By default this rule is enabled with all option for variables and after-used for arguments.

                                                                            {
                                                                                "rules": {
                                                                                    "no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
                                                                                }
                                                                            }

                                                                            vars

                                                                            The vars option has two settings:

                                                                            • all checks all variables for usage, including those in the global scope. This is the default setting.
                                                                            • local checks only that locally-declared variables are used but will allow global variables to be unused.

                                                                            vars: local

                                                                            Examples of correct code for the { "vars": "local" } option:

                                                                            /*eslint no-unused-vars: ["error", { "vars": "local" }]*/
                                                                            /*global some_unused_var */
                                                                            
                                                                            some_unused_var = 42;

                                                                            varsIgnorePattern

                                                                            The varsIgnorePattern option specifies exceptions not to check for usage: variables whose names match a regexp pattern. For example, variables whose names contain ignored or Ignored.

                                                                            Examples of correct code for the { "varsIgnorePattern": "[iI]gnored" } option:

                                                                            /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
                                                                            
                                                                            var firstVarIgnored = 1;
                                                                            var secondVar = 2;
                                                                            console.log(secondVar);

                                                                            args

                                                                            The args option has three settings:

                                                                            • after-used - only the last argument must be used. This allows you, for instance, to have two named parameters to a function and as long as you use the second argument, ESLint will not warn you about the first. This is the default setting.
                                                                            • all - all named arguments must be used.
                                                                            • none - do not check arguments.

                                                                            args: after-used

                                                                            Examples of incorrect code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "after-used" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            Examples of correct code for the default { "args": "after-used" } option:

                                                                            /*eslint no-unused-vars: ["error", {"args": "after-used"}]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return baz;
                                                                            })();

                                                                            args: all

                                                                            Examples of incorrect code for the { "args": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "all" }]*/
                                                                            
                                                                            // 2 errors
                                                                            // "foo" is defined but never used
                                                                            // "baz" is defined but never used
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            args: none

                                                                            Examples of correct code for the { "args": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "args": "none" }]*/
                                                                            
                                                                            (function(foo, bar, baz) {
                                                                                return bar;
                                                                            })();

                                                                            ignoreRestSiblings

                                                                            The ignoreRestSiblings option is a boolean (default: false). Using a Rest Property it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.

                                                                            Examples of correct code for the { "ignoreRestSiblings": true } option:

                                                                            /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
                                                                            // 'type' is ignored because it has a rest property sibling.
                                                                            var { type, ...coords } = data;

                                                                            argsIgnorePattern

                                                                            The argsIgnorePattern option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.

                                                                            Examples of correct code for the { "argsIgnorePattern": "^_" } option:

                                                                            /*eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }]*/
                                                                            
                                                                            function foo(x, _y) {
                                                                                return x + 1;
                                                                            }
                                                                            foo();

                                                                            caughtErrors

                                                                            The caughtErrors option is used for catch block arguments validation.

                                                                            It has two settings:

                                                                            • none - do not check error objects. This is the default setting.
                                                                            • all - all named arguments must be used.

                                                                            caughtErrors: none

                                                                            Not specifying this rule is equivalent of assigning it to none.

                                                                            Examples of correct code for the { "caughtErrors": "none" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "none" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrors: all

                                                                            Examples of incorrect code for the { "caughtErrors": "all" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrors": "all" }]*/
                                                                            
                                                                            // 1 error
                                                                            // "err" is defined but never used
                                                                            try {
                                                                                //...
                                                                            } catch (err) {
                                                                                console.error("errors");
                                                                            }

                                                                            caughtErrorsIgnorePattern

                                                                            The caughtErrorsIgnorePattern option specifies exceptions not to check for usage: catch arguments whose names match a regexp pattern. For example, variables whose names begin with a string 'ignore'.

                                                                            Examples of correct code for the { "caughtErrorsIgnorePattern": "^ignore" } option:

                                                                            /*eslint no-unused-vars: ["error", { "caughtErrorsIgnorePattern": "^ignore" }]*/
                                                                            
                                                                            try {
                                                                                //...
                                                                            } catch (ignoreErr) {
                                                                                console.error("errors");
                                                                            }

                                                                            When Not To Use It

                                                                            If you don't want to be notified about unused variables or function arguments, you can safely turn this rule off. Source: http://eslint.org/docs/rules/

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

                                                                                this.ratio = function(value, min, max, scope, reverse, logScale) {
                                                                                    var fraction, scaleLogBase, x;
                                                                                    scaleLogBase = logScale ? 2.3 : 1;
                                                                                    if (min === max || (value === min && !reverse) || (value === max && reverse)) {
                                                                                        return 0;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 day to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1236..1251

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.x = (function(_this) {
                                                                                    return function(d, layout, conf) {
                                                                                        var angle, height, r;
                                                                                        height = _this.ratio(d.value, conf.cmin, conf.cmax, conf.outerRadius - conf.innerRadius, false, conf.logscale);
                                                                                        if (conf.direction === 'in') {
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 day to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1223..1235

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.ratio = function(value, min, max, scope, reverse, logScale) {
                                                                                    var fraction, scaleLogBase, x;
                                                                                    scaleLogBase = logScale ? 2.3 : 1;
                                                                                    if (min === max || (value === min && !reverse) || (value === max && reverse)) {
                                                                                        return 0;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 day to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1104..1119

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.y = (function(_this) {
                                                                                    return function(d, layout, conf) {
                                                                                        var angle, height, r;
                                                                                        height = _this.ratio(d.value, conf.cmin, conf.cmax, conf.outerRadius - conf.innerRadius, false, conf.logscale);
                                                                                        if (conf.direction === 'in') {
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 day to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1210..1222

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.getTarget = (function(_this) {
                                                                                    return function(d, layout) {
                                                                                        var block, endAngle, result, startAngle;
                                                                                        d = d.target;
                                                                                        block = layout.blocks[d.id];
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 7 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 578..591

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.getSource = (function(_this) {
                                                                                    return function(d, layout) {
                                                                                        var block, endAngle, result, startAngle;
                                                                                        d = d.source;
                                                                                        block = layout.blocks[d.id];
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 7 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 592..605

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

                                                                            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

                                                                                            for (i in ref) {
                                                                                                datum = ref[i];
                                                                                                results1.push((function() {
                                                                                                    var l, len, results2;
                                                                                                    results2 = [];
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 6 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 910..925

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

                                                                            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

                                                                                                    for (l = 0, len = layer.length; l < len; l++) {
                                                                                                        datum = layer[l];
                                                                                                        results2.push((function() {
                                                                                                            var len1, m, results3;
                                                                                                            results3 = [];
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 6 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1078..1093

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

                                                                            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

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

                                                                                    return parentElement.selectAll('tile').data(function(d) {
                                                                                        return d.values;
                                                                                    }).enter().append('path').attr('class', 'tile').attr('d', d3.svg.arc().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).startAngle(function(d, i) {
                                                                                        return utils.theta(d.start, layout.blocks[d.block_id]);
                                                                                    }).endAngle(function(d, i) {
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 4 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 675..683

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

                                                                            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

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

                                                                                    return parentElement.selectAll('tile').data(function(d) {
                                                                                        return d.values;
                                                                                    }).enter().append('path').attr('class', 'tile').attr('opacity', function(d) {
                                                                                        return d.opacity || conf.opacity;
                                                                                    }).attr('d', d3.svg.arc().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).startAngle(function(d, i) {
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 4 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 700..706

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

                                                                            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

                                                                                    }).attr('d', d3.svg.arc().innerRadius(function(d) {
                                                                                        var height;
                                                                                        if (conf.direction === 'in') {
                                                                                            height = utils.ratio(d.value, conf.cmin, conf.cmax, conf.outerRadius - conf.innerRadius, false, conf.logscale);
                                                                                            return conf.outerRadius - height;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 3 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 735..751

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.renderDatumContainer = (function(_this) {
                                                                                    return function(instance, parentElement, name, data, conf) {
                                                                                        var group, track;
                                                                                        track = parentElement.append('g').attr('class', conf.colorPalette);
                                                                                        return group = _this.renderBlock(track, data, instance._layout, conf);
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 667..673

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.renderDatumContainer = (function(_this) {
                                                                                    return function(instance, parentElement, name, data, conf) {
                                                                                        var group, track;
                                                                                        track = parentElement.append('g').attr('class', conf.colorPalette);
                                                                                        return group = _this.renderBlock(track, data, instance._layout, conf);
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 967..973

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

                                                                            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 3 locations. Consider refactoring.
                                                                            Open

                                                                                    point = parentElement.selectAll('.point').data(function(d) {
                                                                                        return d.values;
                                                                                    }).enter().append('path').attr('class', 'point').attr('opacity', function(d) {
                                                                                        return d.opacity || conf.opacity;
                                                                                    }).attr('d', d3.svg.symbol().type(conf.glyph.shape).size(conf.glyph.size)).attr('transform', (function(_this) {
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 2 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 675..683
                                                                            public/packages/circosJS@1.7.0.js on lines 731..755

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

                                                                            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 3 locations. Consider refactoring.
                                                                            Open

                                                                                    bin = parentElement.selectAll('.bin').data(function(d) {
                                                                                        return d.values;
                                                                                    }).enter().append('path').attr('class', 'bin').attr('opacity', function(d) {
                                                                                        return d.opacity || conf.opacity;
                                                                                    }).attr('d', d3.svg.arc().innerRadius(function(d) {
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 2 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 675..683
                                                                            public/packages/circosJS@1.7.0.js on lines 819..823

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

                                                                            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 3 locations. Consider refactoring.
                                                                            Open

                                                                                this.renderDatumContainer = (function(_this) {
                                                                                    return function(instance, parentElement, name, data, conf) {
                                                                                        var group, track;
                                                                                        track = parentElement.append('g').attr('class', name);
                                                                                        return group = _this.renderBlock(track, data, instance._layout, conf);
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 2 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 810..816
                                                                            public/packages/circosJS@1.7.0.js on lines 1010..1016

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

                                                                            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 3 locations. Consider refactoring.
                                                                            Open

                                                                                this.renderDatumContainer = (function(_this) {
                                                                                    return function(instance, parentElement, name, data, conf) {
                                                                                        var group, track;
                                                                                        track = parentElement.append('g').attr('class', name);
                                                                                        return group = _this.renderBlock(track, data, instance._layout, conf);
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 2 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 771..777
                                                                            public/packages/circosJS@1.7.0.js on lines 1010..1016

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

                                                                            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 3 locations. Consider refactoring.
                                                                            Open

                                                                                this.renderDatumContainer = (function(_this) {
                                                                                    return function(instance, parentElement, name, data, conf) {
                                                                                        var group, track;
                                                                                        track = parentElement.append('g').attr('class', name);
                                                                                        return group = _this.renderBlock(track, data, instance._layout, conf);
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 2 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 771..777
                                                                            public/packages/circosJS@1.7.0.js on lines 810..816

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

                                                                            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

                                                                                data = data.filter(function(datum, index) {
                                                                                    return circosJS.checkParent(datum[0], index, layoutSummary, 'parent');
                                                                                }).filter(function(datum, index) {
                                                                                    return circosJS.checkNumber({
                                                                                        position: datum[1],
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 263..285

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

                                                                            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

                                                                                data = data.filter(function(datum, index) {
                                                                                    return circosJS.checkParent(datum[0], index, layoutSummary, 'parent');
                                                                                }).filter(function(datum, index) {
                                                                                    return circosJS.checkNumber({
                                                                                        start: datum[1],
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 310..323

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.scatter = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Scatter();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.scatters[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 489..495
                                                                            public/packages/circosJS@1.7.0.js on lines 497..503
                                                                            public/packages/circosJS@1.7.0.js on lines 505..511
                                                                            public/packages/circosJS@1.7.0.js on lines 521..527
                                                                            public/packages/circosJS@1.7.0.js on lines 529..535
                                                                            public/packages/circosJS@1.7.0.js on lines 537..543
                                                                            public/packages/circosJS@1.7.0.js on lines 545..551

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.text = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Text();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.texts[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 489..495
                                                                            public/packages/circosJS@1.7.0.js on lines 497..503
                                                                            public/packages/circosJS@1.7.0.js on lines 505..511
                                                                            public/packages/circosJS@1.7.0.js on lines 513..519
                                                                            public/packages/circosJS@1.7.0.js on lines 521..527
                                                                            public/packages/circosJS@1.7.0.js on lines 529..535
                                                                            public/packages/circosJS@1.7.0.js on lines 537..543

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.histogram = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Histogram();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.histograms[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 489..495
                                                                            public/packages/circosJS@1.7.0.js on lines 505..511
                                                                            public/packages/circosJS@1.7.0.js on lines 513..519
                                                                            public/packages/circosJS@1.7.0.js on lines 521..527
                                                                            public/packages/circosJS@1.7.0.js on lines 529..535
                                                                            public/packages/circosJS@1.7.0.js on lines 537..543
                                                                            public/packages/circosJS@1.7.0.js on lines 545..551

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.chord = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Chord();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.chords[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 489..495
                                                                            public/packages/circosJS@1.7.0.js on lines 497..503
                                                                            public/packages/circosJS@1.7.0.js on lines 513..519
                                                                            public/packages/circosJS@1.7.0.js on lines 521..527
                                                                            public/packages/circosJS@1.7.0.js on lines 529..535
                                                                            public/packages/circosJS@1.7.0.js on lines 537..543
                                                                            public/packages/circosJS@1.7.0.js on lines 545..551

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.stack = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Stack();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.stacks[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 489..495
                                                                            public/packages/circosJS@1.7.0.js on lines 497..503
                                                                            public/packages/circosJS@1.7.0.js on lines 505..511
                                                                            public/packages/circosJS@1.7.0.js on lines 513..519
                                                                            public/packages/circosJS@1.7.0.js on lines 521..527
                                                                            public/packages/circosJS@1.7.0.js on lines 537..543
                                                                            public/packages/circosJS@1.7.0.js on lines 545..551

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.heatmap = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Heatmap();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.heatmaps[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 497..503
                                                                            public/packages/circosJS@1.7.0.js on lines 505..511
                                                                            public/packages/circosJS@1.7.0.js on lines 513..519
                                                                            public/packages/circosJS@1.7.0.js on lines 521..527
                                                                            public/packages/circosJS@1.7.0.js on lines 529..535
                                                                            public/packages/circosJS@1.7.0.js on lines 537..543
                                                                            public/packages/circosJS@1.7.0.js on lines 545..551

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.line = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Line();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.lines[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 489..495
                                                                            public/packages/circosJS@1.7.0.js on lines 497..503
                                                                            public/packages/circosJS@1.7.0.js on lines 505..511
                                                                            public/packages/circosJS@1.7.0.js on lines 513..519
                                                                            public/packages/circosJS@1.7.0.js on lines 529..535
                                                                            public/packages/circosJS@1.7.0.js on lines 537..543
                                                                            public/packages/circosJS@1.7.0.js on lines 545..551

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

                                                                            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 8 locations. Consider refactoring.
                                                                            Open

                                                                            circosJS.Core.prototype.highlight = function(id, conf, data) {
                                                                                var track;
                                                                                track = new circosJS.Highlight();
                                                                                track.build(this, conf, data);
                                                                                this.tracks.highlights[id] = track;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 7 other locations - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 489..495
                                                                            public/packages/circosJS@1.7.0.js on lines 497..503
                                                                            public/packages/circosJS@1.7.0.js on lines 505..511
                                                                            public/packages/circosJS@1.7.0.js on lines 513..519
                                                                            public/packages/circosJS@1.7.0.js on lines 521..527
                                                                            public/packages/circosJS@1.7.0.js on lines 529..535
                                                                            public/packages/circosJS@1.7.0.js on lines 545..551

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

                                                                            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

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

                                                                                if ('parent_id' in sample && 'start' in sample && 'end' in sample && 'value' in sample) {
                                                                                    data = data.map(function(datum) {
                                                                                        return [datum.parent_id, datum.start, datum.end, datum.value];
                                                                                    });
                                                                                }
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 212..216

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

                                                                            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

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

                                                                                if ('parent_id' in sample && 'start' in sample && 'end' in sample && 'value' in sample) {
                                                                                    data = data.map(function(datum) {
                                                                                        return [datum.parent_id, datum.start, datum.end, datum.value];
                                                                                    });
                                                                                }
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 2 hrs to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 258..262

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

                                                                            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 parentElement.selectAll('.axis').data(axes).enter().append('path').attr('opacity', conf.opacity).attr('class', 'axis').attr('d', axis).attr('stroke-width', function(d, i) {
                                                                                        if (i % conf.axes.major.spacing === 0) {
                                                                                            return conf.axes.major.thickness;
                                                                                        } else {
                                                                                            return conf.axes.minor.thickness;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1193..1205

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

                                                                            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 5 locations. Consider refactoring.
                                                                            Open

                                                                                return {
                                                                                    data: groups,
                                                                                    meta: {
                                                                                        min: d3.min(data, function(d) {
                                                                                            return d.value;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 4 other locations - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 242..252
                                                                            public/packages/circosJS@1.7.0.js on lines 289..299
                                                                            public/packages/circosJS@1.7.0.js on lines 364..374
                                                                            public/packages/circosJS@1.7.0.js on lines 418..428

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

                                                                            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 5 locations. Consider refactoring.
                                                                            Open

                                                                                return {
                                                                                    data: groups,
                                                                                    meta: {
                                                                                        min: d3.min(data, function(d) {
                                                                                            return d.value;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 4 other locations - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 242..252
                                                                            public/packages/circosJS@1.7.0.js on lines 289..299
                                                                            public/packages/circosJS@1.7.0.js on lines 327..337
                                                                            public/packages/circosJS@1.7.0.js on lines 418..428

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

                                                                            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 5 locations. Consider refactoring.
                                                                            Open

                                                                                return {
                                                                                    data: groups,
                                                                                    meta: {
                                                                                        min: d3.min(data, function(d) {
                                                                                            return d.value;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 4 other locations - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 289..299
                                                                            public/packages/circosJS@1.7.0.js on lines 327..337
                                                                            public/packages/circosJS@1.7.0.js on lines 364..374
                                                                            public/packages/circosJS@1.7.0.js on lines 418..428

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

                                                                            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 5 locations. Consider refactoring.
                                                                            Open

                                                                                return {
                                                                                    data: groups,
                                                                                    meta: {
                                                                                        min: d3.min(data, function(d) {
                                                                                            return d.value;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 4 other locations - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 242..252
                                                                            public/packages/circosJS@1.7.0.js on lines 327..337
                                                                            public/packages/circosJS@1.7.0.js on lines 364..374
                                                                            public/packages/circosJS@1.7.0.js on lines 418..428

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

                                                                            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 5 locations. Consider refactoring.
                                                                            Open

                                                                                return {
                                                                                    data: data,
                                                                                    meta: {
                                                                                        min: d3.min(data, function(d) {
                                                                                            return d.value;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 4 other locations - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 242..252
                                                                            public/packages/circosJS@1.7.0.js on lines 289..299
                                                                            public/packages/circosJS@1.7.0.js on lines 327..337
                                                                            public/packages/circosJS@1.7.0.js on lines 364..374

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

                                                                            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

                                                                                        target: {
                                                                                            id: datum[3],
                                                                                            start: Math.max(0, parseFloat(datum[4])),
                                                                                            end: Math.min(layoutSummary[datum[3]], parseFloat(datum[5]))
                                                                                        },
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 404..408

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

                                                                            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

                                                                                        source: {
                                                                                            id: datum[0],
                                                                                            start: Math.max(0, parseFloat(datum[1])),
                                                                                            end: Math.min(layoutSummary[datum[0]], parseFloat(datum[2]))
                                                                                        },
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 409..413

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

                                                                            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

                                                                                        }).attr('d', d3.svg.arc().innerRadius(function(background) {
                                                                                            if (conf.direction === 'in') {
                                                                                                return conf.outerRadius - scope * background.start;
                                                                                            } else {
                                                                                                return conf.innerRadius + scope * background.start;
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1152..1164

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

                                                                            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

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

                                                                                        bin.attr('class', function(d) {
                                                                                            return 'q' + utils.ratio(d.value, conf.cmin, conf.cmax, conf.colorPaletteSize, conf.colorPaletteReverse, conf.logScale) + '-' + conf.colorPaletteSize;
                                                                                        });
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 675..685

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

                                                                            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

                                                                                    for (l = 0, len = ref2.length; l < len; l++) {
                                                                                        d = ref2[l];
                                                                                        layoutSummary[d.id] = d.len;
                                                                                    }
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1049..1052

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

                                                                            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

                                                                                    for (l = 0, len = ref.length; l < len; l++) {
                                                                                        d = ref[l];
                                                                                        layoutSummary[d.id] = d.len;
                                                                                    }
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 480..483

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

                                                                            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

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

                                                                                    if (datum[1] < 0 || datum[2] > layoutSummary[datum[0]]) {
                                                                                        circosJS.log(2, 'position', 'position inconsistency', {
                                                                                            datum: datum,
                                                                                            layoutSummary: layoutSummary
                                                                                        });
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 226..231

                                                                            Duplicated Code

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

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

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

                                                                            Tuning

                                                                            This issue has a mass of 60.

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                    if (datum[1] < 0 || datum[2] > layoutSummary[datum[0]]) {
                                                                                        circosJS.log(2, 'position', 'position inconsistency', {
                                                                                            datum: datum,
                                                                                            layoutSummary: layoutSummary
                                                                                        });
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 272..277

                                                                            Duplicated Code

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

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

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

                                                                            Tuning

                                                                            This issue has a mass of 60.

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                if ('parent_id' in sample && 'position' in sample) {
                                                                                    data = data.map(function(datum) {
                                                                                        return [datum.parent_id, datum.position, datum.value];
                                                                                    });
                                                                                }
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 343..347

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

                                                                            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

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

                                                                                if ('parent_id' in sample && 'position' in sample) {
                                                                                    data = data.map(function(datum) {
                                                                                        return [datum.parent_id, datum.position, datum.value];
                                                                                    });
                                                                                }
                                                                            Severity: Major
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 1 hr to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 305..309

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.datumInnerRadius = (function(_this) {
                                                                                    return function(d, i, j) {
                                                                                        return _this.datumRadialPosition(d, i, j)[0];
                                                                                    };
                                                                                })(this);
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 40 mins to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 962..966

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                this.datumOuterRadius = (function(_this) {
                                                                                    return function(d, i, j) {
                                                                                        return _this.datumRadialPosition(d, i, j)[1];
                                                                                    };
                                                                                })(this);
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 40 mins to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 957..961

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

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

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

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

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

                                                                            Refactorings

                                                                            Further Reading

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

                                                                                    this.blocks[v.id].end = (v.offset + v.len) / size * (2 * Math.PI - block_nb * gap) + k * gap;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 35 mins to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 463..463

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

                                                                            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

                                                                                    link = track.selectAll('.chord').data(data).enter().append('path').attr('class', 'chord').attr('d', d3.svg.chord().source(function(d) {
                                                                                        return getSource(d, layout);
                                                                                    }).target(function(d) {
                                                                                        return getTarget(d, layout);
                                                                                    })).attr('opacity', function(d) {
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 35 mins to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 1144..1146

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

                                                                            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

                                                                                    v.end = (v.offset + v.len) / size * (2 * Math.PI - block_nb * gap) + k * gap;
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 35 mins to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 461..461

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

                                                                            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

                                                                                    block = parentElement.selectAll('.block').data(data).enter().append('g').attr('class', 'block').attr('transform', function(d) {
                                                                                        return 'rotate(' + layout.blocks[d.key].start * 360 / (2 * Math.PI) + ')';
                                                                                    });
                                                                            Severity: Minor
                                                                            Found in public/packages/circosJS@1.7.0.js and 1 other location - About 35 mins to fix
                                                                            public/packages/circosJS@1.7.0.js on lines 620..624

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

                                                                            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

                                                                            There are no issues that match your filters.

                                                                            Category
                                                                            Status