csballz/koala-puree

View on GitHub
lib/service.js

Summary

Maintainability
C
1 day
Test Coverage

Function request has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    request: function(method, path, data, headers) {
        debug(`calling general request helper: start`);
        var self = this;
        function _request(sc, path, nsp, method, data, headers, resolve, reject) {
            var realPath = "";
Severity: Major
Found in lib/service.js - About 2 hrs to fix

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

    var Browser=function(){
      // first search for all possible mdns
      // locate the first dnscache
      // if not located, continue caching everything
      // once located, switch off all browser, and start listening to only dnscache
    Severity: Minor
    Found in lib/service.js - About 2 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

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

    var Browser=function(){
      // first search for all possible mdns
      // locate the first dnscache
      // if not located, continue caching everything
      // once located, switch off all browser, and start listening to only dnscache
    Severity: Minor
    Found in lib/service.js - About 1 hr to fix

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

          middleware: function(){
              return {
                  setup: function *(next) {
                      var app = this;
                      yield (new Promise(function(resolve/*, reject*/){
      Severity: Minor
      Found in lib/service.js - About 1 hr to fix

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

            get: function(name, ver) {
                var time = new Date();
            // think of a way to refactor this into a generator, so we can just store that as a cache and yield everytime
            // hopeful usage would be:
            // var service = cache[service@version].next();
        Severity: Minor
        Found in lib/service.js - About 1 hr to fix

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

                      function resolver() {
                          debug("looping through browser caches");
                  // keep trying for a specific amount of time, now hard coded, 1s
                          if ( new Date() - time > 2000 ) { debug("timeout"); return reject(); }
                          if ( name in globalDnsCache ) {
          Severity: Minor
          Found in lib/service.js - About 1 hr to fix

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

                    function _request(sc, path, nsp, method, data, headers, resolve, reject) {
            Severity: Major
            Found in lib/service.js - About 1 hr to fix

              Strings must use doublequote.
              Open

                          debug(`attempting to retrieve service`);
              Severity: Minor
              Found in lib/service.js by eslint

              enforce the consistent use of either backticks, double, or single quotes (quotes)

              JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

              /*eslint-env es6*/
              
              var double = "double";
              var single = 'single';
              var backtick = `backtick`;    // ES6 only

              Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

              Many codebases require strings to be defined in a consistent manner.

              Rule Details

              This rule enforces the consistent use of either backticks, double, or single quotes.

              Options

              This rule has two options, a string option and an object option.

              String option:

              • "double" (default) requires the use of double quotes wherever possible
              • "single" requires the use of single quotes wherever possible
              • "backtick" requires the use of backticks wherever possible

              Object option:

              • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
              • "allowTemplateLiterals": true allows strings to use backticks

              Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

              double

              Examples of incorrect code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              
              var single = 'single';
              var unescaped = 'a string containing "double" quotes';

              Examples of correct code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              /*eslint-env es6*/
              
              var double = "double";
              var backtick = `back\ntick`;  // backticks are allowed due to newline
              var backtick = tag`backtick`; // backticks are allowed due to tag

              single

              Examples of incorrect code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              
              var double = "double";
              var unescaped = "a string containing 'single' quotes";

              Examples of correct code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              /*eslint-env es6*/
              
              var single = 'single';
              var backtick = `back${x}tick`; // backticks are allowed due to substitution

              backticks

              Examples of incorrect code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              
              var single = 'single';
              var double = "double";
              var unescaped = 'a string containing `backticks`';

              Examples of correct code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              /*eslint-env es6*/
              
              var backtick = `backtick`;

              avoidEscape

              Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
              
              var single = 'a string containing "double" quotes';

              Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
              
              var double = "a string containing 'single' quotes";

              Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
              
              var double = "a string containing `backtick` quotes"

              allowTemplateLiterals

              Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
              
              var double = "double";
              var double = `double`;

              Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
              
              var single = 'single';
              var single = `single`;

              When Not To Use It

              If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

              Strings must use doublequote.
              Open

                      if (service.type.name !== "koala-puree") { debug(`ignoring service, service name not koala-puree`); return; }
              Severity: Minor
              Found in lib/service.js by eslint

              enforce the consistent use of either backticks, double, or single quotes (quotes)

              JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

              /*eslint-env es6*/
              
              var double = "double";
              var single = 'single';
              var backtick = `backtick`;    // ES6 only

              Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

              Many codebases require strings to be defined in a consistent manner.

              Rule Details

              This rule enforces the consistent use of either backticks, double, or single quotes.

              Options

              This rule has two options, a string option and an object option.

              String option:

              • "double" (default) requires the use of double quotes wherever possible
              • "single" requires the use of single quotes wherever possible
              • "backtick" requires the use of backticks wherever possible

              Object option:

              • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
              • "allowTemplateLiterals": true allows strings to use backticks

              Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

              double

              Examples of incorrect code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              
              var single = 'single';
              var unescaped = 'a string containing "double" quotes';

              Examples of correct code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              /*eslint-env es6*/
              
              var double = "double";
              var backtick = `back\ntick`;  // backticks are allowed due to newline
              var backtick = tag`backtick`; // backticks are allowed due to tag

              single

              Examples of incorrect code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              
              var double = "double";
              var unescaped = "a string containing 'single' quotes";

              Examples of correct code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              /*eslint-env es6*/
              
              var single = 'single';
              var backtick = `back${x}tick`; // backticks are allowed due to substitution

              backticks

              Examples of incorrect code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              
              var single = 'single';
              var double = "double";
              var unescaped = 'a string containing `backticks`';

              Examples of correct code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              /*eslint-env es6*/
              
              var backtick = `backtick`;

              avoidEscape

              Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
              
              var single = 'a string containing "double" quotes';

              Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
              
              var double = "a string containing 'single' quotes";

              Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
              
              var double = "a string containing `backtick` quotes"

              allowTemplateLiterals

              Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
              
              var double = "double";
              var double = `double`;

              Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
              
              var single = 'single';
              var single = `single`;

              When Not To Use It

              If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

              Strings must use doublequote.
              Open

                      if (!service.txtRecord || !service.txtRecord.version) { debug(`ignoring service, service.txtRecord does not exist`); return; }
              Severity: Minor
              Found in lib/service.js by eslint

              enforce the consistent use of either backticks, double, or single quotes (quotes)

              JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

              /*eslint-env es6*/
              
              var double = "double";
              var single = 'single';
              var backtick = `backtick`;    // ES6 only

              Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

              Many codebases require strings to be defined in a consistent manner.

              Rule Details

              This rule enforces the consistent use of either backticks, double, or single quotes.

              Options

              This rule has two options, a string option and an object option.

              String option:

              • "double" (default) requires the use of double quotes wherever possible
              • "single" requires the use of single quotes wherever possible
              • "backtick" requires the use of backticks wherever possible

              Object option:

              • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
              • "allowTemplateLiterals": true allows strings to use backticks

              Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

              double

              Examples of incorrect code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              
              var single = 'single';
              var unescaped = 'a string containing "double" quotes';

              Examples of correct code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              /*eslint-env es6*/
              
              var double = "double";
              var backtick = `back\ntick`;  // backticks are allowed due to newline
              var backtick = tag`backtick`; // backticks are allowed due to tag

              single

              Examples of incorrect code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              
              var double = "double";
              var unescaped = "a string containing 'single' quotes";

              Examples of correct code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              /*eslint-env es6*/
              
              var single = 'single';
              var backtick = `back${x}tick`; // backticks are allowed due to substitution

              backticks

              Examples of incorrect code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              
              var single = 'single';
              var double = "double";
              var unescaped = 'a string containing `backticks`';

              Examples of correct code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              /*eslint-env es6*/
              
              var backtick = `backtick`;

              avoidEscape

              Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
              
              var single = 'a string containing "double" quotes';

              Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
              
              var double = "a string containing 'single' quotes";

              Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
              
              var double = "a string containing `backtick` quotes"

              allowTemplateLiterals

              Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
              
              var double = "double";
              var double = `double`;

              Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
              
              var single = 'single';
              var single = `single`;

              When Not To Use It

              If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

              Strings must use doublequote.
              Open

                      debug(`adding service to dns cache`);
              Severity: Minor
              Found in lib/service.js by eslint

              enforce the consistent use of either backticks, double, or single quotes (quotes)

              JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

              /*eslint-env es6*/
              
              var double = "double";
              var single = 'single';
              var backtick = `backtick`;    // ES6 only

              Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

              Many codebases require strings to be defined in a consistent manner.

              Rule Details

              This rule enforces the consistent use of either backticks, double, or single quotes.

              Options

              This rule has two options, a string option and an object option.

              String option:

              • "double" (default) requires the use of double quotes wherever possible
              • "single" requires the use of single quotes wherever possible
              • "backtick" requires the use of backticks wherever possible

              Object option:

              • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
              • "allowTemplateLiterals": true allows strings to use backticks

              Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

              double

              Examples of incorrect code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              
              var single = 'single';
              var unescaped = 'a string containing "double" quotes';

              Examples of correct code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              /*eslint-env es6*/
              
              var double = "double";
              var backtick = `back\ntick`;  // backticks are allowed due to newline
              var backtick = tag`backtick`; // backticks are allowed due to tag

              single

              Examples of incorrect code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              
              var double = "double";
              var unescaped = "a string containing 'single' quotes";

              Examples of correct code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              /*eslint-env es6*/
              
              var single = 'single';
              var backtick = `back${x}tick`; // backticks are allowed due to substitution

              backticks

              Examples of incorrect code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              
              var single = 'single';
              var double = "double";
              var unescaped = 'a string containing `backticks`';

              Examples of correct code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              /*eslint-env es6*/
              
              var backtick = `backtick`;

              avoidEscape

              Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
              
              var single = 'a string containing "double" quotes';

              Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
              
              var double = "a string containing 'single' quotes";

              Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
              
              var double = "a string containing `backtick` quotes"

              allowTemplateLiterals

              Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
              
              var double = "double";
              var double = `double`;

              Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
              
              var single = 'single';
              var single = `single`;

              When Not To Use It

              If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

              Strings must use doublequote.
              Open

                      debug(`calling general request helper: start`);
              Severity: Minor
              Found in lib/service.js by eslint

              enforce the consistent use of either backticks, double, or single quotes (quotes)

              JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

              /*eslint-env es6*/
              
              var double = "double";
              var single = 'single';
              var backtick = `backtick`;    // ES6 only

              Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

              Many codebases require strings to be defined in a consistent manner.

              Rule Details

              This rule enforces the consistent use of either backticks, double, or single quotes.

              Options

              This rule has two options, a string option and an object option.

              String option:

              • "double" (default) requires the use of double quotes wherever possible
              • "single" requires the use of single quotes wherever possible
              • "backtick" requires the use of backticks wherever possible

              Object option:

              • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
              • "allowTemplateLiterals": true allows strings to use backticks

              Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

              double

              Examples of incorrect code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              
              var single = 'single';
              var unescaped = 'a string containing "double" quotes';

              Examples of correct code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              /*eslint-env es6*/
              
              var double = "double";
              var backtick = `back\ntick`;  // backticks are allowed due to newline
              var backtick = tag`backtick`; // backticks are allowed due to tag

              single

              Examples of incorrect code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              
              var double = "double";
              var unescaped = "a string containing 'single' quotes";

              Examples of correct code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              /*eslint-env es6*/
              
              var single = 'single';
              var backtick = `back${x}tick`; // backticks are allowed due to substitution

              backticks

              Examples of incorrect code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              
              var single = 'single';
              var double = "double";
              var unescaped = 'a string containing `backticks`';

              Examples of correct code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              /*eslint-env es6*/
              
              var backtick = `backtick`;

              avoidEscape

              Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
              
              var single = 'a string containing "double" quotes';

              Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
              
              var double = "a string containing 'single' quotes";

              Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
              
              var double = "a string containing `backtick` quotes"

              allowTemplateLiterals

              Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
              
              var double = "double";
              var double = `double`;

              Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
              
              var single = 'single';
              var single = `single`;

              When Not To Use It

              If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

              Strings must use doublequote.
              Open

                              debug(`ioClient already exists`);
              Severity: Minor
              Found in lib/service.js by eslint

              enforce the consistent use of either backticks, double, or single quotes (quotes)

              JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

              /*eslint-env es6*/
              
              var double = "double";
              var single = 'single';
              var backtick = `backtick`;    // ES6 only

              Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

              Many codebases require strings to be defined in a consistent manner.

              Rule Details

              This rule enforces the consistent use of either backticks, double, or single quotes.

              Options

              This rule has two options, a string option and an object option.

              String option:

              • "double" (default) requires the use of double quotes wherever possible
              • "single" requires the use of single quotes wherever possible
              • "backtick" requires the use of backticks wherever possible

              Object option:

              • "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise
              • "allowTemplateLiterals": true allows strings to use backticks

              Deprecated: The object property avoid-escape is deprecated; please use the object property avoidEscape instead.

              double

              Examples of incorrect code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              
              var single = 'single';
              var unescaped = 'a string containing "double" quotes';

              Examples of correct code for this rule with the default "double" option:

              /*eslint quotes: ["error", "double"]*/
              /*eslint-env es6*/
              
              var double = "double";
              var backtick = `back\ntick`;  // backticks are allowed due to newline
              var backtick = tag`backtick`; // backticks are allowed due to tag

              single

              Examples of incorrect code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              
              var double = "double";
              var unescaped = "a string containing 'single' quotes";

              Examples of correct code for this rule with the "single" option:

              /*eslint quotes: ["error", "single"]*/
              /*eslint-env es6*/
              
              var single = 'single';
              var backtick = `back${x}tick`; // backticks are allowed due to substitution

              backticks

              Examples of incorrect code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              
              var single = 'single';
              var double = "double";
              var unescaped = 'a string containing `backticks`';

              Examples of correct code for this rule with the "backtick" option:

              /*eslint quotes: ["error", "backtick"]*/
              /*eslint-env es6*/
              
              var backtick = `backtick`;

              avoidEscape

              Examples of additional correct code for this rule with the "double", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
              
              var single = 'a string containing "double" quotes';

              Examples of additional correct code for this rule with the "single", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "single", { "avoidEscape": true }]*/
              
              var double = "a string containing 'single' quotes";

              Examples of additional correct code for this rule with the "backtick", { "avoidEscape": true } options:

              /*eslint quotes: ["error", "backtick", { "avoidEscape": true }]*/
              
              var double = "a string containing `backtick` quotes"

              allowTemplateLiterals

              Examples of additional correct code for this rule with the "double", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "double", { "allowTemplateLiterals": true }]*/
              
              var double = "double";
              var double = `double`;

              Examples of additional correct code for this rule with the "single", { "allowTemplateLiterals": true } options:

              /*eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
              
              var single = 'single';
              var single = `single`;

              When Not To Use It

              If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

              TODO found
              Open

                // TODO, implement a stream method
              Severity: Minor
              Found in lib/service.js by fixme

              TODO found
              Open

                          // TODO: handle cases where it is not found
              Severity: Minor
              Found in lib/service.js by fixme

              There are no issues that match your filters.

              Category
              Status