cBioPortal/iViz

View on GitHub
app/scripts/views/components/chartOperationsHeader.js

Summary

Maintainability
D
2 days
Test Coverage

Function ready has 101 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ready: function() {
      $('#' + this.chartId + '-download').qtip('destroy', true);
      $('#' + this.chartId + '-download-icon-wrapper').qtip('destroy', true);
      $('#' + this.chartId + '-title').qtip('destroy', true);
      var chartId = this.chartId;
Severity: Major
Found in app/scripts/views/components/chartOperationsHeader.js - About 4 hrs to fix

    File chartOperationsHeader.js has 286 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Created by Karthik Kalletla on 4/14/16.
     */
    'use strict';
    (function(Vue, iViz, dc, $, _) {
    Severity: Minor
    Found in app/scripts/views/components/chartOperationsHeader.js - About 2 hrs to fix

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

          template: '<div class="chart-header" id="{{chartId}}-chart-header">' +
          '<div class="chart-title" ' +
          ':class="[showOperations?chartTitleActive:chartTitle]" ' +
          'v-if="hasChartTitle">' +
          '<span class="chart-title-span" id="{{chartId}}-title">{{displayName}}' +
      Severity: Major
      Found in app/scripts/views/components/chartOperationsHeader.js and 1 other location - About 2 hrs to fix
      app/scripts/views/components/barChart/barChartTemplate.js on lines 7..27

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

              if (this.showPieIcon) {
                this.$nextTick(function() {
                  $('#' + this.chartId + '-chart-header .fa-pie-chart').qtip($.extend(true, this.titleIconQtipOpts, {
                    content: {
                      text: 'Convert table to pie chart'
      Severity: Major
      Found in app/scripts/views/components/chartOperationsHeader.js and 1 other location - About 2 hrs to fix
      app/scripts/views/components/chartOperationsHeader.js on lines 148..156

      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

              if (this.showTableIcon) {
                this.$nextTick(function() {
                  $('#' + this.chartId + '-chart-header .fa-table').qtip($.extend(true, this.titleIconQtipOpts, {
                    content: {
                      text: 'Convert pie chart to table'
      Severity: Major
      Found in app/scripts/views/components/chartOperationsHeader.js and 1 other location - About 2 hrs to fix
      app/scripts/views/components/chartOperationsHeader.js on lines 158..166

      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

                  $('#' + chartId + '-pdf', api.elements.tooltip).click(function() {
                    iViz.util.download(self.chartCtrl.getChartType(), 'pdf', self.chartCtrl.getDownloadData('pdf'));
                  });
      Severity: Major
      Found in app/scripts/views/components/chartOperationsHeader.js and 1 other location - About 2 hrs to fix
      app/scripts/views/components/chartOperationsHeader.js on lines 260..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 77.

      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

                  $('#' + chartId + '-svg', api.elements.tooltip).click(function() {
                    iViz.util.download(self.chartCtrl.getChartType(), 'svg', self.chartCtrl.getDownloadData('svg'));
                  });
      Severity: Major
      Found in app/scripts/views/components/chartOperationsHeader.js and 1 other location - About 2 hrs to fix
      app/scripts/views/components/chartOperationsHeader.js on lines 257..259

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

      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

      Line 219 exceeds the maximum line length of 80.
      Open

            $('#' + this.chartId + '-chart-header .dc-remove-chart-icon').qtip($.extend(true, this.titleIconQtipOpts, {

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 35 exceeds the maximum line length of 80.
      Open

          '<i class="fa fa-arrows dc-chart-drag icon" aria-hidden="true" alt="Move chart"></i>' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 225 exceeds the maximum line length of 80.
      Open

            $('#' + this.chartId + '-chart-header .dc-survival-icon').qtip($.extend(true, this.titleIconQtipOpts, {

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 264 exceeds the maximum line length of 80.
      Open

                    iViz.util.download(self.chartCtrl.getChartType(), 'tsv', self.chartCtrl.getDownloadData('tsv'));

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 25 exceeds the maximum line length of 80.
      Open

          '<i v-if="showTableIcon && chartInitialed" class="fa fa-table icon hover" ' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 160 exceeds the maximum line length of 80.
      Open

                  $('#' + this.chartId + '-chart-header .fa-pie-chart').qtip($.extend(true, this.titleIconQtipOpts, {

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      '&&' should be placed at the end of the line.
      Open

              && self.attributes.view_type === 'survival') {

      Operator Linebreak (operator-linebreak)

      When a statement is too long to fit on a single line, line breaks are generally inserted next to the operators separating expressions. The first style coming to mind would be to place the operator at the end of the line, following the english punctuation rules.

      var fullHeight = borderTop +
                       innerHeight +
                       borderBottom;

      Some developers find that placing operators at the beginning of the line makes the code more readable.

      var fullHeight = borderTop
                     + innerHeight
                     + borderBottom;

      Rule Details

      The operator-linebreak rule is aimed at enforcing a particular operator line break style. As such, it warns whenever it sees a binary operator or assignment that does not adhere to a particular style: either placing linebreaks after or before the operators.

      Options

      The rule takes two options, a string, which can be "after", "before" or "none" where the default is "after" and an object for more fine-grained configuration.

      You can set the style in configuration like this:

      "operator-linebreak": ["error", "before", { "overrides": { "?": "after" } }]

      The default configuration is to enforce line breaks after the operator except for the ternary operator ? and : following that.

      "after"

      This is the default setting for this rule. This option requires the line break to be placed after the operator.

      While using this setting, the following patterns are considered problems:

      /*eslint operator-linebreak: ["error", "after"]*/
      
      foo = 1
      +
      2;
      
      foo = 1
          + 2;
      
      foo
          = 5;
      
      if (someCondition
          || otherCondition) {
      }
      
      answer = everything
        ? 42
        : foo;

      The following patterns are not considered problems:

      /*eslint operator-linebreak: ["error", "after"]*/
      
      foo = 1 + 2;
      
      foo = 1 +
            2;
      
      foo =
          5;
      
      if (someCondition ||
          otherCondition) {
      }
      
      answer = everything ?
        42 :
        foo;

      "before"

      This option requires the line break to be placed before the operator.

      While using this setting, the following patterns are considered problems:

      /*eslint operator-linebreak: ["error", "before"]*/
      
      foo = 1 +
            2;
      
      foo =
          5;
      
      if (someCondition ||
          otherCondition) {
      }
      
      answer = everything ?
        42 :
        foo;

      The following patterns are not considered problems:

      /*eslint operator-linebreak: ["error", "before"]*/
      
      foo = 1 + 2;
      
      foo = 1
          + 2;
      
      foo
          = 5;
      
      if (someCondition
          || otherCondition) {
      }
      
      answer = everything
        ? 42
        : foo;

      "none"

      This option disallows line breaks on either side of the operator.

      While using this setting, the following patterns are considered problems:

      /*eslint operator-linebreak: ["error", "none"]*/
      
      foo = 1 +
            2;
      
      foo = 1
          + 2;
      
      if (someCondition ||
          otherCondition) {
      }
      
      if (someCondition
          || otherCondition) {
      }
      
      answer = everything
        ? 42
        : foo;
      
      answer = everything ?
        42 :
        foo;

      The following patterns are not considered problems:

      /*eslint operator-linebreak: ["error", "none"]*/
      
      foo = 1 + 2;
      
      foo = 5;
      
      if (someCondition || otherCondition) {
      }
      
      answer = everything ? 42 : foo;

      Fine-grained control

      The rule allows you to have even finer-grained control over individual operators by specifying an overrides dictionary:

      "operator-linebreak": ["error", "before", { "overrides": { "?": "after", "+=": "none" } }]

      This would override the global setting for that specific operator.

      "ignore" override

      This option is only supported using overrides and ignores line breaks on either side of the operator.

      While using this setting, the following patterns are not considered problems:

      /*eslint operator-linebreak: ["error", "after", { "overrides": { "?": "ignore", ":": "ignore"} }]*/
      
      answer = everything ?
        42
        : foo;
      
      answer = everything
        ?
        42
        :
        foo;

      When Not To Use It

      If your project will not be using a common operator line break style, turn this rule off.

      Related Rules

      Line 31 exceeds the maximum line length of 80.
      Open

          '<div v-if="showDownloadIcon && chartInitialed"" id="{{chartId}}-download-icon-wrapper" class="download">' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 213 exceeds the maximum line length of 80.
      Open

            $('#' + this.chartId + '-chart-header .dc-chart-drag').qtip($.extend(true, this.titleIconQtipOpts, {

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 30 exceeds the maximum line length of 80.
      Open

          'class="icon hover" @click="getRainbowSurvival" alt="Survival Analysis"/></div>' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 261 exceeds the maximum line length of 80.
      Open

                    iViz.util.download(self.chartCtrl.getChartType(), 'svg', self.chartCtrl.getDownloadData('svg'));

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 126 exceeds the maximum line length of 80.
      Open

              this.chartTitleActive = 'chart-title-active chart-title-active-' + newVal;

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 246 exceeds the maximum line length of 80.
      Open

                  var downloadFileTypes = self.chartCtrl.getDownloadFileTypes().sort(function(a, b) {

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 27 exceeds the maximum line length of 80.
      Open

          '<i v-if="showPieIcon && chartInitialed"" class="fa fa-pie-chart icon hover" ' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 258 exceeds the maximum line length of 80.
      Open

                    iViz.util.download(self.chartCtrl.getChartType(), 'pdf', self.chartCtrl.getDownloadData('pdf'));

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 26 exceeds the maximum line length of 80.
      Open

          'aria-hidden="true" @click="changeView()" alt="Convert pie chart to table"></i>' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 207 exceeds the maximum line length of 80.
      Open

            $('#' + this.chartId + '-download-icon-wrapper').qtip($.extend(true, this.titleIconQtipOpts, {

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 253 exceeds the maximum line length of 80.
      Open

                    content.push('<div style="display:inline-block;"><button id="' + self.chartId + '-' + item + '" style="width:50px">' + (item === 'tsv' ? 'DATA' : item.toUpperCase()) + '</button></div>');

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 28 exceeds the maximum line length of 80.
      Open

          'aria-hidden="true" @click="changeView()" alt="Convert table to pie chart"></i>' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 29 exceeds the maximum line length of 80.
      Open

          '<div class="dc-survival-icon" style="float: left;"><img v-if="showSurvivalIcon && chartInitialed" src="images/survival_icon.svg" ' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 36 exceeds the maximum line length of 80.
      Open

          '<div style="float:right"><i class="fa fa-times dc-remove-chart-icon icon" ' +

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 146 exceeds the maximum line length of 80.
      Open

              $('#' + this.chartId + '-chart-header .fa-pie-chart').qtip('destroy', true);

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      Line 150 exceeds the maximum line length of 80.
      Open

                  $('#' + this.chartId + '-chart-header .fa-table').qtip($.extend(true, this.titleIconQtipOpts, {

      enforce a maximum line length (max-len)

      Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).

      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long

      Rule Details

      This rule enforces a maximum line length to increase code readability and maintainability.

      Note: This rule calculates the length of a line via code points, not characters. That means if you use a double-byte character in your code, it will count as 2 code points instead of 1, and 2 will be used to calculate line length. This is a technical limitation of JavaScript that is made easier with ES2015, and we will look to update this when ES2015 is available in Node.js.

      Options

      This rule has a number or object option:

      • "code" (default 80) enforces a maximum line length
      • "tabWidth" (default 4) specifies the character width for tab characters
      • "comments" enforces a maximum line length for comments; defaults to value of code
      • "ignorePattern" ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON
      • "ignoreComments": true ignores all trailing comments and comments on their own line
      • "ignoreTrailingComments": true ignores only trailing comments
      • "ignoreUrls": true ignores lines that contain a URL

      code

      Examples of incorrect code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };

      Examples of correct code for this rule with the default { "code": 80 } option:

      /*eslint max-len: ["error", 80]*/
      
      var foo = {
        "bar": "This is a bar.",
        "baz": { "qux": "This is a qux" },
        "easier": "to read"
      };

      tabWidth

      Examples of incorrect code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };

      Examples of correct code for this rule with the default { "tabWidth": 4 } option:

      /*eslint max-len: ["error", 80, 4]*/
      
      \t  \t  var foo = {
      \t  \t  \t  \t  "bar": "This is a bar.",
      \t  \t  \t  \t  "baz": { "qux": "This is a qux" }
      \t  \t  };

      comments

      Examples of incorrect code for this rule with the { "comments": 65 } option:

      /*eslint max-len: ["error", { "comments": 65 }]*/
      
      /**
       * This is a comment that violates the maximum line length we have specified
      **/

      ignoreComments

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

      /*eslint max-len: ["error", { "ignoreComments": true }]*/
      
      /**
       * This is a really really really really really really really really really long comment
      **/

      ignoreTrailingComments

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

      /*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
      
      var foo = 'bar'; // This is a really really really really really really really long comment

      ignoreUrls

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

      /*eslint max-len: ["error", { "ignoreUrls": true }]*/
      
      var url = 'https://www.example.com/really/really/really/really/really/really/really/long';

      ignorePattern

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

      /*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
      
      var dep = require('really/really/really/really/really/really/really/really/long/module');

      Related Rules

      • [complexity](complexity.md)
      • [max-depth](max-depth.md)
      • [max-nested-callbacks](max-nested-callbacks.md)
      • [max-params](max-params.md)
      • [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/

      There are no issues that match your filters.

      Category
      Status