IHTSDO/snomed-interaction-components

View on GitHub
external-libs/bootstrap.js

Summary

Maintainability
F
4 days
Test Coverage

File bootstrap.js has 1256 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Bootstrap v3.1.0 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
Severity: Major
Found in external-libs/bootstrap.js - About 3 days to fix

    Function has a complexity of 18.
    Open

      Tooltip.prototype.show = function () {
    Severity: Minor
    Found in external-libs/bootstrap.js by eslint

    Limit Cyclomatic Complexity (complexity)

    Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

    function a(x) {
        if (true) {
            return x; // 1st path
        } else if (false) {
            return x+1; // 2nd path
        } else {
            return 4; // 3rd path
        }
    }

    Rule Details

    This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

    Examples of incorrect code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else if (false) {
            return x+1;
        } else {
            return 4; // 3rd path
        }
    }

    Examples of correct code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else {
            return 4;
        }
    }

    Options

    Optionally, you may specify a max object property:

    "complexity": ["error", 2]

    is equivalent to

    "complexity": ["error", { "max": 2 }]

    Deprecated: the object property maximum is deprecated. Please use the property max instead.

    When Not To Use It

    If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

    Further Reading

    Related Rules

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

    Function has a complexity of 15.
    Open

      Affix.prototype.checkPosition = function () {
    Severity: Minor
    Found in external-libs/bootstrap.js by eslint

    Limit Cyclomatic Complexity (complexity)

    Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

    function a(x) {
        if (true) {
            return x; // 1st path
        } else if (false) {
            return x+1; // 2nd path
        } else {
            return 4; // 3rd path
        }
    }

    Rule Details

    This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

    Examples of incorrect code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else if (false) {
            return x+1;
        } else {
            return 4; // 3rd path
        }
    }

    Examples of correct code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else {
            return 4;
        }
    }

    Options

    Optionally, you may specify a max object property:

    "complexity": ["error", 2]

    is equivalent to

    "complexity": ["error", { "max": 2 }]

    Deprecated: the object property maximum is deprecated. Please use the property max instead.

    When Not To Use It

    If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

    Further Reading

    Related Rules

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

    Function has a complexity of 10.
    Open

      Dropdown.prototype.keydown = function (e) {
    Severity: Minor
    Found in external-libs/bootstrap.js by eslint

    Limit Cyclomatic Complexity (complexity)

    Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

    function a(x) {
        if (true) {
            return x; // 1st path
        } else if (false) {
            return x+1; // 2nd path
        } else {
            return 4; // 3rd path
        }
    }

    Rule Details

    This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

    Examples of incorrect code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else if (false) {
            return x+1;
        } else {
            return 4; // 3rd path
        }
    }

    Examples of correct code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else {
            return 4;
        }
    }

    Options

    Optionally, you may specify a max object property:

    "complexity": ["error", 2]

    is equivalent to

    "complexity": ["error", { "max": 2 }]

    Deprecated: the object property maximum is deprecated. Please use the property max instead.

    When Not To Use It

    If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

    Further Reading

    Related Rules

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

    Function has a complexity of 10.
    Open

      Carousel.prototype.slide = function (type, next) {
    Severity: Minor
    Found in external-libs/bootstrap.js by eslint

    Limit Cyclomatic Complexity (complexity)

    Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

    function a(x) {
        if (true) {
            return x; // 1st path
        } else if (false) {
            return x+1; // 2nd path
        } else {
            return 4; // 3rd path
        }
    }

    Rule Details

    This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

    Examples of incorrect code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else if (false) {
            return x+1;
        } else {
            return 4; // 3rd path
        }
    }

    Examples of correct code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else {
            return 4;
        }
    }

    Options

    Optionally, you may specify a max object property:

    "complexity": ["error", 2]

    is equivalent to

    "complexity": ["error", { "max": 2 }]

    Deprecated: the object property maximum is deprecated. Please use the property max instead.

    When Not To Use It

    If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

    Further Reading

    Related Rules

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

    Function has a complexity of 9.
    Open

      Modal.prototype.backdrop = function (callback) {
    Severity: Minor
    Found in external-libs/bootstrap.js by eslint

    Limit Cyclomatic Complexity (complexity)

    Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

    function a(x) {
        if (true) {
            return x; // 1st path
        } else if (false) {
            return x+1; // 2nd path
        } else {
            return 4; // 3rd path
        }
    }

    Rule Details

    This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

    Examples of incorrect code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else if (false) {
            return x+1;
        } else {
            return 4; // 3rd path
        }
    }

    Examples of correct code for a maximum of 2:

    /*eslint complexity: ["error", 2]*/
    
    function a(x) {
        if (true) {
            return x;
        } else {
            return 4;
        }
    }

    Options

    Optionally, you may specify a max object property:

    "complexity": ["error", 2]

    is equivalent to

    "complexity": ["error", { "max": 2 }]

    Deprecated: the object property maximum is deprecated. Please use the property max instead.

    When Not To Use It

    If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

    Further Reading

    Related Rules

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

    Function show has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Tooltip.prototype.show = function () {
        var e = $.Event('show.bs.' + this.type)
    
        if (this.hasContent() && this.enabled) {
          this.$element.trigger(e)
    Severity: Minor
    Found in external-libs/bootstrap.js - About 2 hrs to fix

      Function has a complexity of 8.
      Open

        Collapse.prototype.show = function () {
      Severity: Minor
      Found in external-libs/bootstrap.js by eslint

      Limit Cyclomatic Complexity (complexity)

      Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

      function a(x) {
          if (true) {
              return x; // 1st path
          } else if (false) {
              return x+1; // 2nd path
          } else {
              return 4; // 3rd path
          }
      }

      Rule Details

      This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

      Examples of incorrect code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else if (false) {
              return x+1;
          } else {
              return 4; // 3rd path
          }
      }

      Examples of correct code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else {
              return 4;
          }
      }

      Options

      Optionally, you may specify a max object property:

      "complexity": ["error", 2]

      is equivalent to

      "complexity": ["error", { "max": 2 }]

      Deprecated: the object property maximum is deprecated. Please use the property max instead.

      When Not To Use It

      If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

      Further Reading

      Related Rules

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

      Function has a complexity of 8.
      Open

        $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
      Severity: Minor
      Found in external-libs/bootstrap.js by eslint

      Limit Cyclomatic Complexity (complexity)

      Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

      function a(x) {
          if (true) {
              return x; // 1st path
          } else if (false) {
              return x+1; // 2nd path
          } else {
              return 4; // 3rd path
          }
      }

      Rule Details

      This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

      Examples of incorrect code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else if (false) {
              return x+1;
          } else {
              return 4; // 3rd path
          }
      }

      Examples of correct code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else {
              return 4;
          }
      }

      Options

      Optionally, you may specify a max object property:

      "complexity": ["error", 2]

      is equivalent to

      "complexity": ["error", { "max": 2 }]

      Deprecated: the object property maximum is deprecated. Please use the property max instead.

      When Not To Use It

      If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

      Further Reading

      Related Rules

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

      Function has a complexity of 7.
      Open

        Tooltip.prototype.applyPlacement = function (offset, placement) {
      Severity: Minor
      Found in external-libs/bootstrap.js by eslint

      Limit Cyclomatic Complexity (complexity)

      Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

      function a(x) {
          if (true) {
              return x; // 1st path
          } else if (false) {
              return x+1; // 2nd path
          } else {
              return 4; // 3rd path
          }
      }

      Rule Details

      This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

      Examples of incorrect code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else if (false) {
              return x+1;
          } else {
              return 4; // 3rd path
          }
      }

      Examples of correct code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else {
              return 4;
          }
      }

      Options

      Optionally, you may specify a max object property:

      "complexity": ["error", 2]

      is equivalent to

      "complexity": ["error", { "max": 2 }]

      Deprecated: the object property maximum is deprecated. Please use the property max instead.

      When Not To Use It

      If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

      Further Reading

      Related Rules

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

      Function has a complexity of 7.
      Open

        Alert.prototype.close = function (e) {
      Severity: Minor
      Found in external-libs/bootstrap.js by eslint

      Limit Cyclomatic Complexity (complexity)

      Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

      function a(x) {
          if (true) {
              return x; // 1st path
          } else if (false) {
              return x+1; // 2nd path
          } else {
              return 4; // 3rd path
          }
      }

      Rule Details

      This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

      Examples of incorrect code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else if (false) {
              return x+1;
          } else {
              return 4; // 3rd path
          }
      }

      Examples of correct code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else {
              return 4;
          }
      }

      Options

      Optionally, you may specify a max object property:

      "complexity": ["error", 2]

      is equivalent to

      "complexity": ["error", { "max": 2 }]

      Deprecated: the object property maximum is deprecated. Please use the property max instead.

      When Not To Use It

      If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

      Further Reading

      Related Rules

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

      Function has a complexity of 7.
      Open

        Tooltip.prototype.init = function (type, element, options) {
      Severity: Minor
      Found in external-libs/bootstrap.js by eslint

      Limit Cyclomatic Complexity (complexity)

      Cyclomatic complexity measures the number of linearly independent paths through a program's source code. This rule allows setting a cyclomatic complexity threshold.

      function a(x) {
          if (true) {
              return x; // 1st path
          } else if (false) {
              return x+1; // 2nd path
          } else {
              return 4; // 3rd path
          }
      }

      Rule Details

      This rule is aimed at reducing code complexity by capping the amount of cyclomatic complexity allowed in a program. As such, it will warn when the cyclomatic complexity crosses the configured threshold (default is 20).

      Examples of incorrect code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else if (false) {
              return x+1;
          } else {
              return 4; // 3rd path
          }
      }

      Examples of correct code for a maximum of 2:

      /*eslint complexity: ["error", 2]*/
      
      function a(x) {
          if (true) {
              return x;
          } else {
              return 4;
          }
      }

      Options

      Optionally, you may specify a max object property:

      "complexity": ["error", 2]

      is equivalent to

      "complexity": ["error", { "max": 2 }]

      Deprecated: the object property maximum is deprecated. Please use the property max instead.

      When Not To Use It

      If you can't determine an appropriate complexity limit for your code, then it's best to disable this rule.

      Further Reading

      Related Rules

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

      Function has too many statements (31). Maximum allowed is 30.
      Open

      +function ($) {
      Severity: Minor
      Found in external-libs/bootstrap.js by eslint

      enforce a maximum number of statements allowed in function blocks (max-statements)

      The max-statements rule allows you to specify the maximum number of statements allowed in a function.

      function foo() {
        var bar = 1; // one statement
        var baz = 2; // two statements
        var qux = 3; // three statements
      }

      Rule Details

      This rule enforces a maximum number of statements allowed in function blocks.

      Options

      This rule has a number or object option:

      • "max" (default 10) enforces a maximum number of statements allows in function blocks

      Deprecated: The object property maximum is deprecated; please use the object property max instead.

      This rule has an object option:

      • "ignoreTopLevelFunctions": true ignores top-level functions

      max

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

      /*eslint max-statements: ["error", 10]*/
      /*eslint-env es6*/
      
      function foo() {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
      
        var foo11 = 11; // Too many.
      }
      
      let foo = () => {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
      
        var foo11 = 11; // Too many.
      };

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

      /*eslint max-statements: ["error", 10]*/
      /*eslint-env es6*/
      
      function foo() {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
        return function () {
      
          // The number of statements in the inner function does not count toward the
          // statement maximum.
      
          return 42;
        };
      }
      
      let foo = () => {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
        return function () {
      
          // The number of statements in the inner function does not count toward the
          // statement maximum.
      
          return 42;
        };
      }

      ignoreTopLevelFunctions

      Examples of additional correct code for this rule with the { "max": 10 }, { "ignoreTopLevelFunctions": true } options:

      /*eslint max-statements: ["error", 10, { "ignoreTopLevelFunctions": true }]*/
      
      function foo() {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
        var foo11 = 11;
      }

      Related Rules

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

      Function has too many statements (31). Maximum allowed is 30.
      Open

        Tooltip.prototype.show = function () {
      Severity: Minor
      Found in external-libs/bootstrap.js by eslint

      enforce a maximum number of statements allowed in function blocks (max-statements)

      The max-statements rule allows you to specify the maximum number of statements allowed in a function.

      function foo() {
        var bar = 1; // one statement
        var baz = 2; // two statements
        var qux = 3; // three statements
      }

      Rule Details

      This rule enforces a maximum number of statements allowed in function blocks.

      Options

      This rule has a number or object option:

      • "max" (default 10) enforces a maximum number of statements allows in function blocks

      Deprecated: The object property maximum is deprecated; please use the object property max instead.

      This rule has an object option:

      • "ignoreTopLevelFunctions": true ignores top-level functions

      max

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

      /*eslint max-statements: ["error", 10]*/
      /*eslint-env es6*/
      
      function foo() {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
      
        var foo11 = 11; // Too many.
      }
      
      let foo = () => {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
      
        var foo11 = 11; // Too many.
      };

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

      /*eslint max-statements: ["error", 10]*/
      /*eslint-env es6*/
      
      function foo() {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
        return function () {
      
          // The number of statements in the inner function does not count toward the
          // statement maximum.
      
          return 42;
        };
      }
      
      let foo = () => {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
        return function () {
      
          // The number of statements in the inner function does not count toward the
          // statement maximum.
      
          return 42;
        };
      }

      ignoreTopLevelFunctions

      Examples of additional correct code for this rule with the { "max": 10 }, { "ignoreTopLevelFunctions": true } options:

      /*eslint max-statements: ["error", 10, { "ignoreTopLevelFunctions": true }]*/
      
      function foo() {
        var foo1 = 1;
        var foo2 = 2;
        var foo3 = 3;
        var foo4 = 4;
        var foo5 = 5;
        var foo6 = 6;
        var foo7 = 7;
        var foo8 = 8;
        var foo9 = 9;
        var foo10 = 10;
        var foo11 = 11;
      }

      Related Rules

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

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

        Carousel.prototype.slide = function (type, next) {
          var $active   = this.$element.find('.item.active')
          var $next     = next || $active[type]()
          var isCycling = this.interval
          var direction = type == 'next' ? 'left' : 'right'
      Severity: Minor
      Found in external-libs/bootstrap.js - About 1 hr to fix

        Function applyPlacement has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Tooltip.prototype.applyPlacement = function (offset, placement) {
            var replace
            var $tip   = this.tip()
            var width  = $tip[0].offsetWidth
            var height = $tip[0].offsetHeight
        Severity: Minor
        Found in external-libs/bootstrap.js - About 1 hr to fix

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

            Modal.prototype.show = function (_relatedTarget) {
              var that = this
              var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
          
              this.$element.trigger(e)
          Severity: Minor
          Found in external-libs/bootstrap.js - About 1 hr to fix

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

              Collapse.prototype.show = function () {
                if (this.transitioning || this.$element.hasClass('in')) return
            
                var startEvent = $.Event('show.bs.collapse')
                this.$element.trigger(startEvent)
            Severity: Minor
            Found in external-libs/bootstrap.js - About 1 hr to fix

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

                Modal.prototype.backdrop = function (callback) {
                  var animate = this.$element.hasClass('fade') ? 'fade' : ''
              
                  if (this.isShown && this.options.backdrop) {
                    var doAnimate = $.support.transition && animate
              Severity: Minor
              Found in external-libs/bootstrap.js - About 1 hr to fix

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

                  Affix.prototype.checkPosition = function () {
                    if (!this.$element.is(':visible')) return
                
                    var scrollHeight = $(document).height()
                    var scrollTop    = this.$window.scrollTop()
                Severity: Minor
                Found in external-libs/bootstrap.js - About 1 hr to fix

                  Function activate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Tab.prototype.activate = function (element, container, callback) {
                      var $active    = container.find('> .active')
                      var transition = callback
                        && $.support.transition
                        && $active.hasClass('fade')
                  Severity: Minor
                  Found in external-libs/bootstrap.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                          if (autoPlace) {
                            var $parent = this.$element.parent()
                    
                            var orgPlacement = placement
                            var docScroll    = document.documentElement.scrollTop || document.body.scrollTop
                    Severity: Major
                    Found in external-libs/bootstrap.js - About 40 mins to fix

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Wrap an immediate function invocation in parentheses.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require IIFEs to be Wrapped (wrap-iife)

                      You can immediately invoke function expressions, but not function declarations. A common technique to create an immediately-invoked function expression (IIFE) is to wrap a function declaration in parentheses. The opening parentheses causes the contained function to be parsed as an expression, rather than a declaration.

                      // function expression could be unwrapped
                      var x = function () { return { y: 1 };}();
                      
                      // function declaration must be wrapped
                      function () { /* side effects */ }(); // SyntaxError

                      Rule Details

                      This rule requires all immediately-invoked function expressions to be wrapped in parentheses.

                      Options

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

                      String option:

                      • "outside" enforces always wrapping the call expression. The default is "outside".
                      • "inside" enforces always wrapping the function expression.
                      • "any" enforces always wrapping, but allows either style.

                      Object option:

                      • "functionPrototypeMethods": true additionally enforces wrapping function expressions invoked using .call and .apply. The default is false.

                      outside

                      Examples of incorrect code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      Examples of correct code for the default "outside" option:

                      /*eslint wrap-iife: ["error", "outside"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      inside

                      Examples of incorrect code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped
                      var x = (function () { return { y: 1 };}()); // wrapped call expression

                      Examples of correct code for the "inside" option:

                      /*eslint wrap-iife: ["error", "inside"]*/
                      
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      any

                      Examples of incorrect code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = function () { return { y: 1 };}(); // unwrapped

                      Examples of correct code for the "any" option:

                      /*eslint wrap-iife: ["error", "any"]*/
                      
                      var x = (function () { return { y: 1 };}()); // wrapped call expression
                      var x = (function () { return { y: 1 };})(); // wrapped function expression

                      functionPrototypeMethods

                      Examples of incorrect code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = function(){ foo(); }()
                      var x = (function(){ foo(); }())
                      var x = function(){ foo(); }.call(bar)
                      var x = (function(){ foo(); }.call(bar))

                      Examples of correct code for this rule with the "inside", { "functionPrototypeMethods": true } options:

                      /* eslint wrap-iife: [2, "inside", { functionPrototypeMethods: true }] */
                      
                      var x = (function(){ foo(); })()
                      var x = (function(){ foo(); }).call(bar)

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

                      Unexpected newline between object and [ of property access.
                      Open

                            [0].offsetHeight
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      disallow confusing multiline expressions (no-unexpected-multiline)

                      Semicolons are usually optional in JavaScript, because of automatic semicolon insertion (ASI). You can require or disallow semicolons with the [semi](./semi.md) rule.

                      The rules for ASI are relatively straightforward: As once described by Isaac Schlueter, a newline character always ends a statement, just like a semicolon, except where one of the following is true:

                      • The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
                      • The line is -- or ++ (in which case it will decrement/increment the next token.)
                      • It is a for(), while(), do, if(), or else, and there is no {
                      • The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

                      In the exceptions where a newline does not end a statement, a typing mistake to omit a semicolon causes two unrelated consecutive lines to be interpreted as one expression. Especially for a coding style without semicolons, readers might overlook the mistake. Although syntactically correct, the code might throw exceptions when it is executed.

                      Rule Details

                      This rule disallows confusing multiline expressions where a newline looks like it is ending a statement, but is not.

                      Examples of incorrect code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar
                      (1 || 2).baz();
                      
                      var hello = 'world'
                      [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {}
                      `hello`
                      
                      let x = function() {}
                      x
                      `hello`

                      Examples of correct code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar;
                      (1 || 2).baz();
                      
                      var foo = bar
                      ;(1 || 2).baz()
                      
                      var hello = 'world';
                      [1, 2, 3].forEach(addNumber);
                      
                      var hello = 'world'
                      void [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {};
                      `hello`
                      
                      let tag = function() {}
                      tag `hello`

                      When Not To Use It

                      You can turn this rule off if you are confident that you will not accidentally introduce code like this.

                      Note that the patterns considered problems are not flagged by the [semi](semi.md) rule.

                      Related Rules

                      Expected '===' and instead saw '=='.
                      Open

                            var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                              var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          if (options.delay && typeof options.delay == 'number') {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                            if (defaults[key] != value) options[key] = value
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          isCycling && this.cycle()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          this.$element
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option](_relatedTarget)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Return statement should not contain assignment.
                      Open

                          if ($next.hasClass('active')) return this.sliding = false
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Assignment in return Statement (no-return-assign)

                      One of the interesting, and sometimes confusing, aspects of JavaScript is that assignment can happen at almost any point. Because of this, an errant equals sign can end up causing assignment when the true intent was to do a comparison. This is especially true when using a return statement. For example:

                      function doSomething() {
                          return foo = bar + 2;
                      }

                      It is difficult to tell the intent of the return statement here. It's possible that the function is meant to return the result of bar + 2, but then why is it assigning to foo? It's also possible that the intent was to use a comparison operator such as == and that this code is an error.

                      Because of this ambiguity, it's considered a best practice to not use assignment in return statements.

                      Rule Details

                      This rule aims to eliminate assignments from return statements. As such, it will warn whenever an assignment is found as part of return.

                      Options

                      The rule takes one option, a string, which must contain one of the following values:

                      • except-parens (default): Disallow assignments unless they are enclosed in parentheses.
                      • always: Disallow all assignments.

                      except-parens

                      This is the default option. It disallows assignments unless they are enclosed in parentheses.

                      Examples of incorrect code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }

                      Examples of correct code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      always

                      This option disallows all assignments in return statements. All assignments are treated as problems.

                      Examples of incorrect code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      Examples of correct code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }

                      When Not To Use It

                      If you want to allow the use of assignment operators in a return statement, then you can safely disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                              $nextIndicator && $nextIndicator.addClass('active')
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                                 placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          this.options.pause == 'hover' && this.$element
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          if (activeIndex == pos) return this.pause().cycle()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            $next[0].offsetWidth // force reflow
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'number') data.to(option)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (e.which == 27) $parent.find(toggle).focus()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          this.$backdrop && this.$backdrop.remove()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                              this.options.backdrop == 'static'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                                          placement == 'right'  && pos.right + actualWidth > parentWidth                              ? 'left'   :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          this.options.interval
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                          var fallback  = type == 'next' ? 'first' : 'last'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Unexpected newline between object and [ of property access.
                      Open

                            [dimension](this.$element[dimension]())
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      disallow confusing multiline expressions (no-unexpected-multiline)

                      Semicolons are usually optional in JavaScript, because of automatic semicolon insertion (ASI). You can require or disallow semicolons with the [semi](./semi.md) rule.

                      The rules for ASI are relatively straightforward: As once described by Isaac Schlueter, a newline character always ends a statement, just like a semicolon, except where one of the following is true:

                      • The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
                      • The line is -- or ++ (in which case it will decrement/increment the next token.)
                      • It is a for(), while(), do, if(), or else, and there is no {
                      • The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

                      In the exceptions where a newline does not end a statement, a typing mistake to omit a semicolon causes two unrelated consecutive lines to be interpreted as one expression. Especially for a coding style without semicolons, readers might overlook the mistake. Although syntactically correct, the code might throw exceptions when it is executed.

                      Rule Details

                      This rule disallows confusing multiline expressions where a newline looks like it is ending a statement, but is not.

                      Examples of incorrect code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar
                      (1 || 2).baz();
                      
                      var hello = 'world'
                      [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {}
                      `hello`
                      
                      let x = function() {}
                      x
                      `hello`

                      Examples of correct code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar;
                      (1 || 2).baz();
                      
                      var foo = bar
                      ;(1 || 2).baz()
                      
                      var hello = 'world';
                      [1, 2, 3].forEach(addNumber);
                      
                      var hello = 'world'
                      void [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {};
                      `hello`
                      
                      let tag = function() {}
                      tag `hello`

                      When Not To Use It

                      You can turn this rule off if you are confident that you will not accidentally introduce code like this.

                      Note that the patterns considered problems are not flagged by the [semi](semi.md) rule.

                      Related Rules

                      Expected an assignment or function call and instead saw an expression.
                      Open

                              $this.is(':visible') && $this.focus()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            var placement = typeof this.options.placement == 'function' ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            $.support.transition && this.$tip.hasClass('fade') ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                          if (!isActive || (isActive && e.keyCode == 27)) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                              var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          if (placement == 'top' && actualHeight != height) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option].call($this)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            var options = typeof option == 'object' && option
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (option == 'toggle') data.toggle()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          this.options.pause == 'hover' && this.$element
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            doAnimate ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (self.hoverState == 'out') self.hide()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                              var parentLeft   = this.options.container == 'body' ? 0 : $parent.offset().left
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          $.support.transition && $parent.hasClass('fade') ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                              this.options.backdrop == 'static'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (trigger == 'click') {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          this.interval && clearInterval(this.interval)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      unnecessary '.call()'.
                      Open

                                ? this.$element[0].focus.call(this.$element[0])
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow unnecessary .call() and .apply(). (no-useless-call)

                      The function invocation can be written by Function.prototype.call() and Function.prototype.apply(). But Function.prototype.call() and Function.prototype.apply() are slower than the normal function invocation.

                      Rule Details

                      This rule is aimed to flag usage of Function.prototype.call() and Function.prototype.apply() that can be replaced with the normal function invocation.

                      Examples of incorrect code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      // These are same as `foo(1, 2, 3);`
                      foo.call(undefined, 1, 2, 3);
                      foo.apply(undefined, [1, 2, 3]);
                      foo.call(null, 1, 2, 3);
                      foo.apply(null, [1, 2, 3]);
                      
                      // These are same as `obj.foo(1, 2, 3);`
                      obj.foo.call(obj, 1, 2, 3);
                      obj.foo.apply(obj, [1, 2, 3]);

                      Examples of correct code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      // The `this` binding is different.
                      foo.call(obj, 1, 2, 3);
                      foo.apply(obj, [1, 2, 3]);
                      obj.foo.call(null, 1, 2, 3);
                      obj.foo.apply(null, [1, 2, 3]);
                      obj.foo.call(otherObj, 1, 2, 3);
                      obj.foo.apply(otherObj, [1, 2, 3]);
                      
                      // The argument list is variadic.
                      foo.apply(undefined, args);
                      foo.apply(null, args);
                      obj.foo.apply(obj, args);

                      Known Limitations

                      This rule compares code statically to check whether or not thisArg is changed. So if the code about thisArg is a dynamic expression, this rule cannot judge correctly.

                      Examples of incorrect code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      a[i++].foo.call(a[i++], 1, 2, 3);

                      Examples of correct code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      a[++i].foo.call(a[i], 1, 2, 3);

                      When Not To Use It

                      If you don't want to be notified about unnecessary .call() and .apply(), you can safely disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            $.support.transition && this.$element.hasClass('fade') ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                              var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                                          placement == 'left'   && pos.left  - actualWidth < parentLeft                               ? 'right'  :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected a conditional expression and instead saw an assignment.
                      Open

                          if (slideIndex = $this.attr('data-slide-to')) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      disallow assignment operators in conditional statements (no-cond-assign)

                      In conditional statements, it is very easy to mistype a comparison operator (such as ==) as an assignment operator (such as =). For example:

                      // Check the user's job title
                      if (user.jobTitle = "manager") {
                          // user.jobTitle is now incorrect
                      }

                      There are valid reasons to use assignment operators in conditional statements. However, it can be difficult to tell whether a specific assignment was intentional.

                      Rule Details

                      This rule disallows ambiguous assignment operators in test conditions of if, for, while, and do...while statements.

                      Options

                      This rule has a string option:

                      • "except-parens" (default) allows assignments in test conditions only if they are enclosed in parentheses (for example, to allow reassigning a variable in the test of a while or do...while loop)
                      • "always" disallows all assignments in test conditions

                      except-parens

                      Examples of incorrect code for this rule with the default "except-parens" option:

                      /*eslint no-cond-assign: "error"*/
                      
                      // Unintentional assignment
                      var x;
                      if (x = 0) {
                          var b = 1;
                      }
                      
                      // Practical example that is similar to an error
                      function setHeight(someNode) {
                          "use strict";
                          do {
                              someNode.height = "100px";
                          } while (someNode = someNode.parentNode);
                      }

                      Examples of correct code for this rule with the default "except-parens" option:

                      /*eslint no-cond-assign: "error"*/
                      
                      // Assignment replaced by comparison
                      var x;
                      if (x === 0) {
                          var b = 1;
                      }
                      
                      // Practical example that wraps the assignment in parentheses
                      function setHeight(someNode) {
                          "use strict";
                          do {
                              someNode.height = "100px";
                          } while ((someNode = someNode.parentNode));
                      }
                      
                      // Practical example that wraps the assignment and tests for 'null'
                      function setHeight(someNode) {
                          "use strict";
                          do {
                              someNode.height = "100px";
                          } while ((someNode = someNode.parentNode) !== null);
                      }

                      always

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

                      /*eslint no-cond-assign: ["error", "always"]*/
                      
                      // Unintentional assignment
                      var x;
                      if (x = 0) {
                          var b = 1;
                      }
                      
                      // Practical example that is similar to an error
                      function setHeight(someNode) {
                          "use strict";
                          do {
                              someNode.height = "100px";
                          } while (someNode = someNode.parentNode);
                      }
                      
                      // Practical example that wraps the assignment in parentheses
                      function setHeight(someNode) {
                          "use strict";
                          do {
                              someNode.height = "100px";
                          } while ((someNode = someNode.parentNode));
                      }
                      
                      // Practical example that wraps the assignment and tests for 'null'
                      function setHeight(someNode) {
                          "use strict";
                          do {
                              someNode.height = "100px";
                          } while ((someNode = someNode.parentNode) !== null);
                      }

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

                      /*eslint no-cond-assign: ["error", "always"]*/
                      
                      // Assignment replaced by comparison
                      var x;
                      if (x === 0) {
                          var b = 1;
                      }

                      Related Rules

                      Expected '===' and instead saw '=='.
                      Open

                            if (state == 'loadingText') {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                              e.which == 27 && this.hide()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Unexpected newline between object and [ of property access.
                      Open

                            [dimension](0)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      disallow confusing multiline expressions (no-unexpected-multiline)

                      Semicolons are usually optional in JavaScript, because of automatic semicolon insertion (ASI). You can require or disallow semicolons with the [semi](./semi.md) rule.

                      The rules for ASI are relatively straightforward: As once described by Isaac Schlueter, a newline character always ends a statement, just like a semicolon, except where one of the following is true:

                      • The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
                      • The line is -- or ++ (in which case it will decrement/increment the next token.)
                      • It is a for(), while(), do, if(), or else, and there is no {
                      • The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

                      In the exceptions where a newline does not end a statement, a typing mistake to omit a semicolon causes two unrelated consecutive lines to be interpreted as one expression. Especially for a coding style without semicolons, readers might overlook the mistake. Although syntactically correct, the code might throw exceptions when it is executed.

                      Rule Details

                      This rule disallows confusing multiline expressions where a newline looks like it is ending a statement, but is not.

                      Examples of incorrect code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar
                      (1 || 2).baz();
                      
                      var hello = 'world'
                      [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {}
                      `hello`
                      
                      let x = function() {}
                      x
                      `hello`

                      Examples of correct code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar;
                      (1 || 2).baz();
                      
                      var foo = bar
                      ;(1 || 2).baz()
                      
                      var hello = 'world';
                      [1, 2, 3].forEach(addNumber);
                      
                      var hello = 'world'
                      void [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {};
                      `hello`
                      
                      let tag = function() {}
                      tag `hello`

                      When Not To Use It

                      You can turn this rule off if you are confident that you will not accidentally introduce code like this.

                      Note that the patterns considered problems are not flagged by the [semi](semi.md) rule.

                      Related Rules

                      unnecessary '.call()'.
                      Open

                                : this.hide.call(this)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow unnecessary .call() and .apply(). (no-useless-call)

                      The function invocation can be written by Function.prototype.call() and Function.prototype.apply(). But Function.prototype.call() and Function.prototype.apply() are slower than the normal function invocation.

                      Rule Details

                      This rule is aimed to flag usage of Function.prototype.call() and Function.prototype.apply() that can be replaced with the normal function invocation.

                      Examples of incorrect code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      // These are same as `foo(1, 2, 3);`
                      foo.call(undefined, 1, 2, 3);
                      foo.apply(undefined, [1, 2, 3]);
                      foo.call(null, 1, 2, 3);
                      foo.apply(null, [1, 2, 3]);
                      
                      // These are same as `obj.foo(1, 2, 3);`
                      obj.foo.call(obj, 1, 2, 3);
                      obj.foo.apply(obj, [1, 2, 3]);

                      Examples of correct code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      // The `this` binding is different.
                      foo.call(obj, 1, 2, 3);
                      foo.apply(obj, [1, 2, 3]);
                      obj.foo.call(null, 1, 2, 3);
                      obj.foo.apply(null, [1, 2, 3]);
                      obj.foo.call(otherObj, 1, 2, 3);
                      obj.foo.apply(otherObj, [1, 2, 3]);
                      
                      // The argument list is variadic.
                      foo.apply(undefined, args);
                      foo.apply(null, args);
                      obj.foo.apply(obj, args);

                      Known Limitations

                      This rule compares code statically to check whether or not thisArg is changed. So if the code about thisArg is a dynamic expression, this rule cannot judge correctly.

                      Examples of incorrect code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      a[i++].foo.call(a[i++], 1, 2, 3);

                      Examples of correct code for this rule:

                      /*eslint no-useless-call: "error"*/
                      
                      a[++i].foo.call(a[i], 1, 2, 3);

                      When Not To Use It

                      If you don't want to be notified about unnecessary .call() and .apply(), you can safely disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option].call($this)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                              that.$element[0].offsetWidth // force reflow
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                              e.which == 27 && this.hide()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected return with your callback function.
                      Open

                            callback()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Enforce Return After Callback (callback-return)

                      The callback pattern is at the heart of most I/O and event-driven programming in JavaScript.

                      function doSomething(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      To prevent calling the callback multiple times it is important to return anytime the callback is triggered outside of the main function body. Neglecting this technique often leads to issues where you do something more than once. For example, in the case of an HTTP request, you may try to send HTTP headers more than once leading Node.js to throw a Can't render headers after they are sent to the client. error.

                      Rule Details

                      This rule is aimed at ensuring that callbacks used outside of the main function block are always part-of or immediately preceding a return statement. This rule decides what is a callback based on the name of the function being called.

                      Options

                      The rule takes a single option - an array of possible callback names - which may include object methods. The default callback names are callback, cb, next.

                      Default callback names

                      Examples of incorrect code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err);
                          }
                          callback();
                      }

                      Examples of correct code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      Supplied callback names

                      Examples of incorrect code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              send.error(err);
                          }
                          send.success();
                      }

                      Examples of correct code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              return done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              return send.error(err);
                          }
                          send.success();
                      }

                      Known Limitations

                      Because it is difficult to understand the meaning of a program through static analysis, this rule has limitations:

                      • false negatives when this rule reports correct code, but the program calls the callback more than one time (which is incorrect behavior)
                      • false positives when this rule reports incorrect code, but the program calls the callback only one time (which is correct behavior)

                      Passing the callback by reference

                      The static analysis of this rule does not detect that the program calls the callback if it is an argument of a function (for example, setTimeout).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              setTimeout(callback, 0); // this is bad, but WILL NOT warn
                          }
                          callback();
                      }

                      Triggering the callback within a nested function

                      The static analysis of this rule does not detect that the program calls the callback from within a nested function or an immediately-invoked function expression (IIFE).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              process.nextTick(function() {
                                  return callback(); // this is bad, but WILL NOT warn
                              });
                          }
                          callback();
                      }

                      If/else statements

                      The static analysis of this rule does not detect that the program calls the callback only one time in each branch of an if statement.

                      Example of a false positive when this rule reports incorrect code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err); // this is fine, but WILL warn
                          } else {
                              callback();    // this is fine, but WILL warn
                          }
                      }

                      When Not To Use It

                      There are some cases where you might want to call a callback function more than once. In those cases this rule may lead to incorrect behavior. In those cases you may want to reserve a special name for those callbacks and not include that in the list of callbacks that trigger warnings.

                      Further Reading

                      Related Rules

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          this.options.selector ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                              var parentWidth  = this.options.container == 'body' ? window.innerWidth  : $parent.outerWidth()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                                          placement == 'top'    && pos.top   - docScroll   - actualHeight < 0                         ? 'bottom' :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                          if (placement == 'top' && actualHeight != height) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                          if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          var direction = type == 'next' ? 'left' : 'right'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Unexpected newline between object and [ of property access.
                      Open

                              [dimension]('auto')
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      disallow confusing multiline expressions (no-unexpected-multiline)

                      Semicolons are usually optional in JavaScript, because of automatic semicolon insertion (ASI). You can require or disallow semicolons with the [semi](./semi.md) rule.

                      The rules for ASI are relatively straightforward: As once described by Isaac Schlueter, a newline character always ends a statement, just like a semicolon, except where one of the following is true:

                      • The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
                      • The line is -- or ++ (in which case it will decrement/increment the next token.)
                      • It is a for(), while(), do, if(), or else, and there is no {
                      • The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

                      In the exceptions where a newline does not end a statement, a typing mistake to omit a semicolon causes two unrelated consecutive lines to be interpreted as one expression. Especially for a coding style without semicolons, readers might overlook the mistake. Although syntactically correct, the code might throw exceptions when it is executed.

                      Rule Details

                      This rule disallows confusing multiline expressions where a newline looks like it is ending a statement, but is not.

                      Examples of incorrect code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar
                      (1 || 2).baz();
                      
                      var hello = 'world'
                      [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {}
                      `hello`
                      
                      let x = function() {}
                      x
                      `hello`

                      Examples of correct code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar;
                      (1 || 2).baz();
                      
                      var foo = bar
                      ;(1 || 2).baz()
                      
                      var hello = 'world';
                      [1, 2, 3].forEach(addNumber);
                      
                      var hello = 'world'
                      void [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {};
                      `hello`
                      
                      let tag = function() {}
                      tag `hello`

                      When Not To Use It

                      You can turn this rule off if you are confident that you will not accidentally introduce code like this.

                      Note that the patterns considered problems are not flagged by the [semi](semi.md) rule.

                      Related Rules

                      Expected '===' and instead saw '=='.
                      Open

                          if (e.keyCode == 38 && index > 0)                 index--                        // up
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            transition ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          $.support.transition && this.$tip.hasClass('fade') ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          e || (this.paused = true)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            var action  = typeof option == 'string' ? option : options.slide
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Unexpected newline between object and [ of property access.
                      Open

                            [dimension](this.$element[0][scrollSize])
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      disallow confusing multiline expressions (no-unexpected-multiline)

                      Semicolons are usually optional in JavaScript, because of automatic semicolon insertion (ASI). You can require or disallow semicolons with the [semi](./semi.md) rule.

                      The rules for ASI are relatively straightforward: As once described by Isaac Schlueter, a newline character always ends a statement, just like a semicolon, except where one of the following is true:

                      • The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
                      • The line is -- or ++ (in which case it will decrement/increment the next token.)
                      • It is a for(), while(), do, if(), or else, and there is no {
                      • The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

                      In the exceptions where a newline does not end a statement, a typing mistake to omit a semicolon causes two unrelated consecutive lines to be interpreted as one expression. Especially for a coding style without semicolons, readers might overlook the mistake. Although syntactically correct, the code might throw exceptions when it is executed.

                      Rule Details

                      This rule disallows confusing multiline expressions where a newline looks like it is ending a statement, but is not.

                      Examples of incorrect code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar
                      (1 || 2).baz();
                      
                      var hello = 'world'
                      [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {}
                      `hello`
                      
                      let x = function() {}
                      x
                      `hello`

                      Examples of correct code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar;
                      (1 || 2).baz();
                      
                      var foo = bar
                      ;(1 || 2).baz()
                      
                      var hello = 'world';
                      [1, 2, 3].forEach(addNumber);
                      
                      var hello = 'world'
                      void [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {};
                      `hello`
                      
                      let tag = function() {}
                      tag `hello`

                      When Not To Use It

                      You can turn this rule off if you are confident that you will not accidentally introduce code like this.

                      Note that the patterns considered problems are not flagged by the [semi](semi.md) rule.

                      Related Rules

                      Unexpected newline between object and [ of property access.
                      Open

                            [dimension](0)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      disallow confusing multiline expressions (no-unexpected-multiline)

                      Semicolons are usually optional in JavaScript, because of automatic semicolon insertion (ASI). You can require or disallow semicolons with the [semi](./semi.md) rule.

                      The rules for ASI are relatively straightforward: As once described by Isaac Schlueter, a newline character always ends a statement, just like a semicolon, except where one of the following is true:

                      • The statement has an unclosed paren, array literal, or object literal or ends in some other way that is not a valid way to end a statement. (For instance, ending with . or ,.)
                      • The line is -- or ++ (in which case it will decrement/increment the next token.)
                      • It is a for(), while(), do, if(), or else, and there is no {
                      • The next line starts with [, (, +, *, /, -, ,, ., or some other binary operator that can only be found between two tokens in a single expression.

                      In the exceptions where a newline does not end a statement, a typing mistake to omit a semicolon causes two unrelated consecutive lines to be interpreted as one expression. Especially for a coding style without semicolons, readers might overlook the mistake. Although syntactically correct, the code might throw exceptions when it is executed.

                      Rule Details

                      This rule disallows confusing multiline expressions where a newline looks like it is ending a statement, but is not.

                      Examples of incorrect code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar
                      (1 || 2).baz();
                      
                      var hello = 'world'
                      [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {}
                      `hello`
                      
                      let x = function() {}
                      x
                      `hello`

                      Examples of correct code for this rule:

                      /*eslint no-unexpected-multiline: "error"*/
                      
                      var foo = bar;
                      (1 || 2).baz();
                      
                      var foo = bar
                      ;(1 || 2).baz()
                      
                      var hello = 'world';
                      [1, 2, 3].forEach(addNumber);
                      
                      var hello = 'world'
                      void [1, 2, 3].forEach(addNumber);
                      
                      let x = function() {};
                      `hello`
                      
                      let tag = function() {}
                      tag `hello`

                      When Not To Use It

                      You can turn this rule off if you are confident that you will not accidentally introduce code like this.

                      Note that the patterns considered problems are not flagged by the [semi](semi.md) rule.

                      Related Rules

                      Expected return with your callback function.
                      Open

                              callback()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Enforce Return After Callback (callback-return)

                      The callback pattern is at the heart of most I/O and event-driven programming in JavaScript.

                      function doSomething(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      To prevent calling the callback multiple times it is important to return anytime the callback is triggered outside of the main function body. Neglecting this technique often leads to issues where you do something more than once. For example, in the case of an HTTP request, you may try to send HTTP headers more than once leading Node.js to throw a Can't render headers after they are sent to the client. error.

                      Rule Details

                      This rule is aimed at ensuring that callbacks used outside of the main function block are always part-of or immediately preceding a return statement. This rule decides what is a callback based on the name of the function being called.

                      Options

                      The rule takes a single option - an array of possible callback names - which may include object methods. The default callback names are callback, cb, next.

                      Default callback names

                      Examples of incorrect code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err);
                          }
                          callback();
                      }

                      Examples of correct code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      Supplied callback names

                      Examples of incorrect code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              send.error(err);
                          }
                          send.success();
                      }

                      Examples of correct code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              return done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              return send.error(err);
                          }
                          send.success();
                      }

                      Known Limitations

                      Because it is difficult to understand the meaning of a program through static analysis, this rule has limitations:

                      • false negatives when this rule reports correct code, but the program calls the callback more than one time (which is incorrect behavior)
                      • false positives when this rule reports incorrect code, but the program calls the callback only one time (which is correct behavior)

                      Passing the callback by reference

                      The static analysis of this rule does not detect that the program calls the callback if it is an argument of a function (for example, setTimeout).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              setTimeout(callback, 0); // this is bad, but WILL NOT warn
                          }
                          callback();
                      }

                      Triggering the callback within a nested function

                      The static analysis of this rule does not detect that the program calls the callback from within a nested function or an immediately-invoked function expression (IIFE).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              process.nextTick(function() {
                                  return callback(); // this is bad, but WILL NOT warn
                              });
                          }
                          callback();
                      }

                      If/else statements

                      The static analysis of this rule does not detect that the program calls the callback only one time in each branch of an if statement.

                      Example of a false positive when this rule reports incorrect code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err); // this is fine, but WILL warn
                          } else {
                              callback();    // this is fine, but WILL warn
                          }
                      }

                      When Not To Use It

                      There are some cases where you might want to call a callback function more than once. In those cases this rule may lead to incorrect behavior. In those cases you may want to reserve a special name for those callbacks and not include that in the list of callbacks that trigger warnings.

                      Further Reading

                      Related Rules

                      Expected '===' and instead saw '=='.
                      Open

                            if (self.hoverState == 'in') self.show()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                              placement = placement == 'bottom' && pos.top   + pos.height  + actualHeight - docScroll > parentHeight  ? 'top'    :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '!==' and instead saw '!='.
                      Open

                            if (that.hoverState != 'in') $tip.detach()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          e || (this.paused = false)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            hasData || actives.data('bs.collapse', null)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          $.support.transition && this.$element.hasClass('fade') ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected return with your callback function.
                      Open

                              callback()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Enforce Return After Callback (callback-return)

                      The callback pattern is at the heart of most I/O and event-driven programming in JavaScript.

                      function doSomething(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      To prevent calling the callback multiple times it is important to return anytime the callback is triggered outside of the main function body. Neglecting this technique often leads to issues where you do something more than once. For example, in the case of an HTTP request, you may try to send HTTP headers more than once leading Node.js to throw a Can't render headers after they are sent to the client. error.

                      Rule Details

                      This rule is aimed at ensuring that callbacks used outside of the main function block are always part-of or immediately preceding a return statement. This rule decides what is a callback based on the name of the function being called.

                      Options

                      The rule takes a single option - an array of possible callback names - which may include object methods. The default callback names are callback, cb, next.

                      Default callback names

                      Examples of incorrect code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err);
                          }
                          callback();
                      }

                      Examples of correct code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      Supplied callback names

                      Examples of incorrect code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              send.error(err);
                          }
                          send.success();
                      }

                      Examples of correct code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              return done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              return send.error(err);
                          }
                          send.success();
                      }

                      Known Limitations

                      Because it is difficult to understand the meaning of a program through static analysis, this rule has limitations:

                      • false negatives when this rule reports correct code, but the program calls the callback more than one time (which is incorrect behavior)
                      • false positives when this rule reports incorrect code, but the program calls the callback only one time (which is correct behavior)

                      Passing the callback by reference

                      The static analysis of this rule does not detect that the program calls the callback if it is an argument of a function (for example, setTimeout).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              setTimeout(callback, 0); // this is bad, but WILL NOT warn
                          }
                          callback();
                      }

                      Triggering the callback within a nested function

                      The static analysis of this rule does not detect that the program calls the callback from within a nested function or an immediately-invoked function expression (IIFE).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              process.nextTick(function() {
                                  return callback(); // this is bad, but WILL NOT warn
                              });
                          }
                          callback();
                      }

                      If/else statements

                      The static analysis of this rule does not detect that the program calls the callback only one time in each branch of an if statement.

                      Example of a false positive when this rule reports incorrect code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err); // this is fine, but WILL warn
                          } else {
                              callback();    // this is fine, but WILL warn
                          }
                      }

                      When Not To Use It

                      There are some cases where you might want to call a callback function more than once. In those cases this rule may lead to incorrect behavior. In those cases you may want to reserve a special name for those callbacks and not include that in the list of callbacks that trigger warnings.

                      Further Reading

                      Related Rules

                      Expected '!==' and instead saw '!='.
                      Open

                            } else if (trigger != 'manual') {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            var options = typeof option == 'object' && option
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if ($input.prop('type') == 'radio') {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          isCycling && this.pause()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (!data && options.toggle && option == 'show') option = !option
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option]()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          this._options && $.each(this._options, function (key, value) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (!data && option == 'destroy') return
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                          if (typeof offset != 'object')         offsetBottom = offsetTop = offset
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            || (typeof o.content == 'function' ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option]()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Use ‘===’ to compare with ‘null’.
                      Open

                          var affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Null Comparisons (no-eq-null)

                      Comparing to null without a type-checking operator (== or !=), can have unintended results as the comparison will evaluate to true when comparing to not just a null, but also an undefined value.

                      if (foo == null) {
                        bar();
                      }

                      Rule Details

                      The no-eq-null rule aims reduce potential bug and unwanted behavior by ensuring that comparisons to null only match null, and not also undefined. As such it will flag comparisons to null when using == and !=.

                      Examples of incorrect code for this rule:

                      /*eslint no-eq-null: "error"*/
                      
                      if (foo == null) {
                        bar();
                      }
                      
                      while (qux != null) {
                        baz();
                      }

                      Examples of correct code for this rule:

                      /*eslint no-eq-null: "error"*/
                      
                      if (foo === null) {
                        bar();
                      }
                      
                      while (qux !== null) {
                        baz();
                      }

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

                      Use ‘===’ to compare with ‘null’.
                      Open

                                      offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Null Comparisons (no-eq-null)

                      Comparing to null without a type-checking operator (== or !=), can have unintended results as the comparison will evaluate to true when comparing to not just a null, but also an undefined value.

                      if (foo == null) {
                        bar();
                      }

                      Rule Details

                      The no-eq-null rule aims reduce potential bug and unwanted behavior by ensuring that comparisons to null only match null, and not also undefined. As such it will flag comparisons to null when using == and !=.

                      Examples of incorrect code for this rule:

                      /*eslint no-eq-null: "error"*/
                      
                      if (foo == null) {
                        bar();
                      }
                      
                      while (qux != null) {
                        baz();
                      }

                      Examples of correct code for this rule:

                      /*eslint no-eq-null: "error"*/
                      
                      if (foo === null) {
                        bar();
                      }
                      
                      while (qux !== null) {
                        baz();
                      }

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option]()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                                 placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option]()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                          var affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Return statement should not contain assignment.
                      Open

                          return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Assignment in return Statement (no-return-assign)

                      One of the interesting, and sometimes confusing, aspects of JavaScript is that assignment can happen at almost any point. Because of this, an errant equals sign can end up causing assignment when the true intent was to do a comparison. This is especially true when using a return statement. For example:

                      function doSomething() {
                          return foo = bar + 2;
                      }

                      It is difficult to tell the intent of the return statement here. It's possible that the function is meant to return the result of bar + 2, but then why is it assigning to foo? It's also possible that the intent was to use a comparison operator such as == and that this code is an error.

                      Because of this ambiguity, it's considered a best practice to not use assignment in return statements.

                      Rule Details

                      This rule aims to eliminate assignments from return statements. As such, it will warn whenever an assignment is found as part of return.

                      Options

                      The rule takes one option, a string, which must contain one of the following values:

                      • except-parens (default): Disallow assignments unless they are enclosed in parentheses.
                      • always: Disallow all assignments.

                      except-parens

                      This is the default option. It disallows assignments unless they are enclosed in parentheses.

                      Examples of incorrect code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }

                      Examples of correct code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      always

                      This option disallows all assignments in return statements. All assignments are treated as problems.

                      Examples of incorrect code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      Examples of correct code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }

                      When Not To Use It

                      If you want to allow the use of assignment operators in a return statement, then you can safely disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                                      offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          if (affix == 'bottom') {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            activeTarget != targets[i]
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            var options = typeof option == 'object' && option
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Use ‘===’ to compare with ‘null’.
                      Open

                                      offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Null Comparisons (no-eq-null)

                      Comparing to null without a type-checking operator (== or !=), can have unintended results as the comparison will evaluate to true when comparing to not just a null, but also an undefined value.

                      if (foo == null) {
                        bar();
                      }

                      Rule Details

                      The no-eq-null rule aims reduce potential bug and unwanted behavior by ensuring that comparisons to null only match null, and not also undefined. As such it will flag comparisons to null when using == and !=.

                      Examples of incorrect code for this rule:

                      /*eslint no-eq-null: "error"*/
                      
                      if (foo == null) {
                        bar();
                      }
                      
                      while (qux != null) {
                        baz();
                      }

                      Examples of correct code for this rule:

                      /*eslint no-eq-null: "error"*/
                      
                      if (foo === null) {
                        bar();
                      }
                      
                      while (qux !== null) {
                        baz();
                      }

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

                      Expected '===' and instead saw '=='.
                      Open

                            || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option]()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          var offsetMethod = this.$element[0] == window ? 'offset' : 'position'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                            activeTarget != targets[i]
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                              element[0].offsetWidth // reflow for transition
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected an assignment or function call and instead saw an expression.
                      Open

                            callback && callback()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Return statement should not contain assignment.
                      Open

                          return this.$tip = this.$tip || $(this.options.template)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Assignment in return Statement (no-return-assign)

                      One of the interesting, and sometimes confusing, aspects of JavaScript is that assignment can happen at almost any point. Because of this, an errant equals sign can end up causing assignment when the true intent was to do a comparison. This is especially true when using a return statement. For example:

                      function doSomething() {
                          return foo = bar + 2;
                      }

                      It is difficult to tell the intent of the return statement here. It's possible that the function is meant to return the result of bar + 2, but then why is it assigning to foo? It's also possible that the intent was to use a comparison operator such as == and that this code is an error.

                      Because of this ambiguity, it's considered a best practice to not use assignment in return statements.

                      Rule Details

                      This rule aims to eliminate assignments from return statements. As such, it will warn whenever an assignment is found as part of return.

                      Options

                      The rule takes one option, a string, which must contain one of the following values:

                      • except-parens (default): Disallow assignments unless they are enclosed in parentheses.
                      • always: Disallow all assignments.

                      except-parens

                      This is the default option. It disallows assignments unless they are enclosed in parentheses.

                      Examples of incorrect code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }

                      Examples of correct code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      always

                      This option disallows all assignments in return statements. All assignments are treated as problems.

                      Examples of incorrect code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      Examples of correct code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }

                      When Not To Use It

                      If you want to allow the use of assignment operators in a return statement, then you can safely disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                            var options = typeof option == 'object' && option
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                            return activeTarget != (i = targets.last()[0]) && this.activate(i)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          if (this.affixed == 'top') position.top += scrollTop
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            if (typeof option == 'string') data[option]()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                      +function ($) {
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected '===' and instead saw '=='.
                      Open

                          if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                            return activeTarget != (i = targets[0]) && this.activate(i)
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            var options = typeof option == 'object' && option
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                            this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '!==' and instead saw '!='.
                      Open

                                      offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected '===' and instead saw '=='.
                      Open

                          this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Expected an assignment or function call and instead saw an expression.
                      Open

                          transition ?
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Unused Expressions (no-unused-expressions)

                      An unused expression which has no effect on the state of the program indicates a logic error.

                      For example, n + 1; is not a syntax error, but it might be a typing mistake where a programmer meant an assignment statement n += 1; instead.

                      Rule Details

                      This rule aims to eliminate unused expressions which have no effect on the state of the program.

                      This rule does not apply to function calls or constructor calls with the new operator, because they could have side effects on the state of the program.

                      var i = 0;
                      function increment() { i += 1; }
                      increment(); // return value is unused, but i changed as a side effect
                      
                      var nThings = 0;
                      function Thing() { nThings += 1; }
                      new Thing(); // constructed object is unused, but nThings changed as a side effect

                      This rule does not apply to directives (which are in the form of literal string expressions such as "use strict"; at the beginning of a script, module, or function).

                      Sequence expressions (those using a comma, such as a = 1, b = 2) are always considered unused unless their return value is assigned or used in a condition evaluation, or a function call is made with the sequence expression value.

                      Options

                      This rule, in its default state, does not require any arguments. If you would like to enable one or more of the following you may pass an object with the options set as follows:

                      • allowShortCircuit set to true will allow you to use short circuit evaluations in your expressions (Default: false).
                      • allowTernary set to true will enable you to use ternary operators in your expressions similarly to short circuit evaluations (Default: false).
                      • allowTaggedTemplates set to true will enable you to use tagged template literals in your expressions (Default: false).

                      These options allow unused expressions only if all of the code paths either directly change the state (for example, assignment statement) or could have side effects (for example, function call).

                      Examples of incorrect code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      0
                      
                      if(0) 0
                      
                      {0}
                      
                      f(0), {}
                      
                      a && b()
                      
                      a, b()
                      
                      c = a, b;
                      
                      a() && function namedFunctionInExpressionContext () {f();}
                      
                      (function anIncompleteIIFE () {});
                      
                      injectGlobal`body{ color: red; }`

                      Note that one or more string expression statements (with or without semi-colons) will only be considered as unused if they are not in the beginning of a script, module, or function (alone and uninterrupted by other statements). Otherwise, they will be treated as part of a "directive prologue", a section potentially usable by JavaScript engines. This includes "strict mode" directives.

                      "use strict";
                      "use asm"
                      "use stricter";
                      "use babel"
                      "any other strings like this in the prologue";

                      Examples of correct code for the default { "allowShortCircuit": false, "allowTernary": false } options:

                      /*eslint no-unused-expressions: "error"*/
                      
                      {} // In this context, this is a block statement, not an object literal
                      
                      {myLabel: someVar} // In this context, this is a block statement with a label and expression, not an object literal
                      
                      function namedFunctionDeclaration () {}
                      
                      (function aGenuineIIFE () {}());
                      
                      f()
                      
                      a = 0
                      
                      new C
                      
                      delete a.b
                      
                      void a

                      allowShortCircuit

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a || b

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

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true }]*/
                      
                      a && b()
                      a() || (b = c)

                      allowTernary

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b : 0
                      a ? b : c()

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

                      /*eslint no-unused-expressions: ["error", { "allowTernary": true }]*/
                      
                      a ? b() : c()
                      a ? (b = c) : d()

                      allowShortCircuit and allowTernary

                      Examples of correct code for the { "allowShortCircuit": true, "allowTernary": true } options:

                      /*eslint no-unused-expressions: ["error", { "allowShortCircuit": true, "allowTernary": true }]*/
                      
                      a ? b() || (c = d) : e()

                      allowTaggedTemplates

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      `some untagged template string`;

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

                      /*eslint no-unused-expressions: ["error", { "allowTaggedTemplates": true }]*/
                      
                      tag`some tagged template string`;

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

                      Expected return with your callback function.
                      Open

                            next()
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Enforce Return After Callback (callback-return)

                      The callback pattern is at the heart of most I/O and event-driven programming in JavaScript.

                      function doSomething(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      To prevent calling the callback multiple times it is important to return anytime the callback is triggered outside of the main function body. Neglecting this technique often leads to issues where you do something more than once. For example, in the case of an HTTP request, you may try to send HTTP headers more than once leading Node.js to throw a Can't render headers after they are sent to the client. error.

                      Rule Details

                      This rule is aimed at ensuring that callbacks used outside of the main function block are always part-of or immediately preceding a return statement. This rule decides what is a callback based on the name of the function being called.

                      Options

                      The rule takes a single option - an array of possible callback names - which may include object methods. The default callback names are callback, cb, next.

                      Default callback names

                      Examples of incorrect code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err);
                          }
                          callback();
                      }

                      Examples of correct code for this rule with the default ["callback", "cb", "next"] option:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              return callback(err);
                          }
                          callback();
                      }

                      Supplied callback names

                      Examples of incorrect code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              send.error(err);
                          }
                          send.success();
                      }

                      Examples of correct code for this rule with the option ["done", "send.error", "send.success"]:

                      /*eslint callback-return: ["error", ["done", "send.error", "send.success"]]*/
                      
                      function foo(err, done) {
                          if (err) {
                              return done(err);
                          }
                          done();
                      }
                      
                      function bar(err, send) {
                          if (err) {
                              return send.error(err);
                          }
                          send.success();
                      }

                      Known Limitations

                      Because it is difficult to understand the meaning of a program through static analysis, this rule has limitations:

                      • false negatives when this rule reports correct code, but the program calls the callback more than one time (which is incorrect behavior)
                      • false positives when this rule reports incorrect code, but the program calls the callback only one time (which is correct behavior)

                      Passing the callback by reference

                      The static analysis of this rule does not detect that the program calls the callback if it is an argument of a function (for example, setTimeout).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              setTimeout(callback, 0); // this is bad, but WILL NOT warn
                          }
                          callback();
                      }

                      Triggering the callback within a nested function

                      The static analysis of this rule does not detect that the program calls the callback from within a nested function or an immediately-invoked function expression (IIFE).

                      Example of a false negative when this rule reports correct code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              process.nextTick(function() {
                                  return callback(); // this is bad, but WILL NOT warn
                              });
                          }
                          callback();
                      }

                      If/else statements

                      The static analysis of this rule does not detect that the program calls the callback only one time in each branch of an if statement.

                      Example of a false positive when this rule reports incorrect code:

                      /*eslint callback-return: "error"*/
                      
                      function foo(err, callback) {
                          if (err) {
                              callback(err); // this is fine, but WILL warn
                          } else {
                              callback();    // this is fine, but WILL warn
                          }
                      }

                      When Not To Use It

                      There are some cases where you might want to call a callback function more than once. In those cases this rule may lead to incorrect behavior. In those cases you may want to reserve a special name for those callbacks and not include that in the list of callbacks that trigger warnings.

                      Further Reading

                      Related Rules

                      Expected '===' and instead saw '=='.
                      Open

                            if (!data && option == 'destroy') return
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Require === and !== (eqeqeq)

                      It is considered good practice to use the type-safe equality operators === and !== instead of their regular counterparts == and !=.

                      The reason for this is that == and != do type coercion which follows the rather obscure Abstract Equality Comparison Algorithm. For instance, the following statements are all considered true:

                      • [] == false
                      • [] == ![]
                      • 3 == "03"

                      If one of those occurs in an innocent-looking statement such as a == b the actual problem is very difficult to spot.

                      Rule Details

                      This rule is aimed at eliminating the type-unsafe equality operators.

                      Examples of incorrect code for this rule:

                      /*eslint eqeqeq: "error"*/
                      
                      if (x == 42) { }
                      
                      if ("" == text) { }
                      
                      if (obj.getStuff() != undefined) { }

                      The --fix option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a typeof expression, or if both operands are literals with the same type.

                      Options

                      always

                      The "always" option (default) enforces the use of === and !== in every situation (except when you opt-in to more specific handling of null [see below]).

                      Examples of incorrect code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a == b
                      foo == true
                      bananas != 1
                      value == undefined
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      Examples of correct code for the "always" option:

                      /*eslint eqeqeq: ["error", "always"]*/
                      
                      a === b
                      foo === true
                      bananas !== 1
                      value === undefined
                      typeof foo === 'undefined'
                      'hello' !== 'world'
                      0 === 0
                      true === true
                      foo === null

                      This rule optionally takes a second argument, which should be an object with the following supported properties:

                      • "null": Customize how this rule treats null literals. Possible values:
                        • always (default) - Always use === or !==.
                        • never - Never use === or !== with null.
                        • ignore - Do not apply this rule to null.

                      smart

                      The "smart" option enforces the use of === and !== except for these cases:

                      • Comparing two literal values
                      • Evaluating the value of typeof
                      • Comparing against null

                      Examples of incorrect code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      // comparing two variables requires ===
                      a == b
                      
                      // only one side is a literal
                      foo == true
                      bananas != 1
                      
                      // comparing to undefined requires ===
                      value == undefined

                      Examples of correct code for the "smart" option:

                      /*eslint eqeqeq: ["error", "smart"]*/
                      
                      typeof foo == 'undefined'
                      'hello' != 'world'
                      0 == 0
                      true == true
                      foo == null

                      allow-null

                      Deprecated: Instead of using this option use "always" and pass a "null" option property with value "ignore". This will tell eslint to always enforce strict equality except when comparing with the null literal.

                      ["error", "always", {"null": "ignore"}]

                      When Not To Use It

                      If you don't want to enforce a style for using equality operators, then it's safe to disable this rule. Source: http://eslint.org/docs/rules/

                      Return statement should not contain assignment.
                      Open

                          return this.$arrow = this.$arrow || this.tip().find('.arrow')
                      Severity: Minor
                      Found in external-libs/bootstrap.js by eslint

                      Disallow Assignment in return Statement (no-return-assign)

                      One of the interesting, and sometimes confusing, aspects of JavaScript is that assignment can happen at almost any point. Because of this, an errant equals sign can end up causing assignment when the true intent was to do a comparison. This is especially true when using a return statement. For example:

                      function doSomething() {
                          return foo = bar + 2;
                      }

                      It is difficult to tell the intent of the return statement here. It's possible that the function is meant to return the result of bar + 2, but then why is it assigning to foo? It's also possible that the intent was to use a comparison operator such as == and that this code is an error.

                      Because of this ambiguity, it's considered a best practice to not use assignment in return statements.

                      Rule Details

                      This rule aims to eliminate assignments from return statements. As such, it will warn whenever an assignment is found as part of return.

                      Options

                      The rule takes one option, a string, which must contain one of the following values:

                      • except-parens (default): Disallow assignments unless they are enclosed in parentheses.
                      • always: Disallow all assignments.

                      except-parens

                      This is the default option. It disallows assignments unless they are enclosed in parentheses.

                      Examples of incorrect code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }

                      Examples of correct code for the default "except-parens" option:

                      /*eslint no-return-assign: "error"*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      always

                      This option disallows all assignments in return statements. All assignments are treated as problems.

                      Examples of incorrect code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo = bar + 2;
                      }
                      
                      function doSomething() {
                          return foo += 2;
                      }
                      
                      function doSomething() {
                          return (foo = bar + 2);
                      }

                      Examples of correct code for the "always" option:

                      /*eslint no-return-assign: ["error", "always"]*/
                      
                      function doSomething() {
                          return foo == bar + 2;
                      }
                      
                      function doSomething() {
                          return foo === bar + 2;
                      }

                      When Not To Use It

                      If you want to allow the use of assignment operators in a return statement, then you can safely disable this rule. Source: http://eslint.org/docs/rules/

                      There are no issues that match your filters.

                      Category
                      Status