public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js

Summary

Maintainability
F
1 wk
Test Coverage

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

    var draw = function($picker, option, year, month, day, hour, min) {

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/

File jquery.simple-dtpicker.js has 1065 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * jquery-simple-datetimepicker (jquery.simple-dtpicker.js)
 * v1.12.0
 * (c) Masanori Ohgita - 2014.
 * https://github.com/mugifly/jquery-simple-datetimepicker
Severity: Major
Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js - About 2 days to fix

    Function draw has 324 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var draw = function($picker, option, year, month, day, hour, min) {
            var date = new Date();
    
            if (hour != null) {
                date = new Date(year, month, day, hour, min, 0);
    Severity: Major
    Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js - About 1 day to fix

      Function has a complexity of 64.
      Open

          var draw = function($picker, option, year, month, day, hour, min) {

      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 (78). Maximum allowed is 30.
      Open

          var init = function($obj, opt) {

      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 init has 125 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var init = function($obj, opt) {
              /* Container */
              var $picker = $('<div>');
      
              $picker.destroy = function() {
      Severity: Major
      Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js - About 5 hrs to fix

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

            var parseDate = function (str, opt_date_format) {

        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 appendDtpicker has 93 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

             $.fn.appendDtpicker = function(config) {
                var date = new Date();
                var defaults = getDefaults();
                
                defaults.inline = false;
        Severity: Major
        Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js - About 3 hrs to fix

          Function has a complexity of 23.
          Open

              var parseDate = function (str, opt_date_format) {

          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 parseDate has 80 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var parseDate = function (str, opt_date_format) {
                  var re, m, date;
                  if(opt_date_format != null){
                      // Parse date & time with date-format
          
          
          Severity: Major
          Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js - About 3 hrs to fix

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

             (function($) {

            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 a complexity of 13.
            Open

                var init = function($obj, opt) {

            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 (35). Maximum allowed is 30.
            Open

                    return this.each(function(i) {

            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 draw has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                var draw = function($picker, option, year, month, day, hour, min) {
            Severity: Major
            Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js - About 50 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if(/(YYYY|YY|MM|DD|mm|dd|M|D|h|m)/.test(format_buf)){
                                          formats.push( format_buf );
                                          format_buf = '';
                                      } else {
                                          format_buf = '';
              Severity: Major
              Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js - About 45 mins to fix

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

                                while (df_ != null && 0 < df_.length) {

                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

                                    } else if(f == 'DD' || f == 'D'){

                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

                                    } else if(f == 'hh' || f == 'h'){

                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

                            } else if (oldDate.getHours() != date.getHours() || oldDate.getMinutes() != date.getMinutes()){

                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(date == null){

                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

                        if ((maxDate == null) || (maxDate > cDate.getTime())) {

                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 ((!isFutureOnly || !isCurrentMonth) && ((minDate == null) || (minDate < cDate.getTime()))

                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

                            if(allowWdays != null) {

                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 ($.inArray(wday, allowWdays) == -1) {

                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

                            }else if(changePoint == "timelist"){

                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

                                ((minDate != null) && (minDate > realDayObjMN.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime())) // compare to 00:00:00

                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/

                Missing radix parameter.
                Open

                        opt.maxTime[1]=parseInt(opt.maxTime[1]);

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

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

                                        if (func != null) {

                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 ($picker != null) {

                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

                            if ($picker != null) {

                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 ($picker != null) {

                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($picker.data("inputObjectId") != null && $picker.data("isInline") === false && $picker.css('display') != 'none'){

                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

                            if( m != null){

                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(f == 'YYYY'){

                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

                                    } else if(f == 'mm' || f == 'm'){

                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 ($link_next_month != null) {

                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 ($inp == null) {

                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

                                    ((minDate != null) && (minDate > realDayObj.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime()))

                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

                            if($(input).val() != null && $(input).val() !== ""){

                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

                                        if (func != null) {

                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

                                    $input.data('beforeVal') == null ||

                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

                            if ($picker != null) {

                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 ($picker != null) {

                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.$pickerObject.css('display') == 'none') {

                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

                                    } else if(f == 'YY'){

                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 (old != $inp.val()) { // only trigger if it actually changed to avoid a nasty loop condition

                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

                        } else if (year != null) {

                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

                        if(oldDate != null){

                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

                        if ((!isFutureOnly || !isCurrentMonth) && ((minDate == null) || (minDate < cDate.getTime()))

                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

                                    ( $input.data('beforeVal') != null && $input.data('beforeVal') != $input.val())    )

                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 (func != null) {

                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 isCurrentMonth = isCurrentYear && todayDate.getMonth() == date.getMonth();

                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 (format == "default"){

                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

                        if(opt_date_format != null){

                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(opt_date_format != null){

                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

                                    } else if(f == 'hh' || f == 'h'){

                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

                        if ($inp == null) {

                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

                        if (hour != null) {

                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

                        if(allowWdays != null && allowWdays.length <= 6) {

                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

                            }else if(changePoint == "timelist"){

                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

                                    ((minDate != null) && (minDate > realDayObj.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime()))

                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 (opt.inputObjectId != null) {

                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 (func != null) {

                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

                        if ($input != null && $picker.data('isInline') === false) { // Float mode

                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

                        if ($input != null && $picker.data('isInline') === false) { // Float mode

                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 ($input != null && $picker.data('isInline') === false) { // Float mode

                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

                        if ($picker.data("inputObjectId") != null) {

                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/

                Don't make functions within a loop.
                Open

                                    $o.click(function() {

                Disallow Functions in Loops (no-loop-func)

                Writing functions within loops tends to result in errors due to the way the function creates a closure around the loop. For example:

                for (var i = 0; i < 10; i++) {
                    funcs[i] = function() {
                        return i;
                    };
                }

                In this case, you would expect each function created within the loop to return a different number. In reality, each function returns 10, because that was the last value of i in the scope.

                let or const mitigate this problem.

                /*eslint-env es6*/
                
                for (let i = 0; i < 10; i++) {
                    funcs[i] = function() {
                        return i;
                    };
                }

                In this case, each function created within the loop returns a different number as expected.

                Rule Details

                This error is raised to highlight a piece of code that may not work as you expect it to and could also indicate a misunderstanding of how the language works. Your code may run without any problems if you do not fix this error, but in some situations it could behave unexpectedly.

                Examples of incorrect code for this rule:

                /*eslint no-loop-func: "error"*/
                /*eslint-env es6*/
                
                for (var i=10; i; i--) {
                    (function() { return i; })();
                }
                
                while(i) {
                    var a = function() { return i; };
                    a();
                }
                
                do {
                    function a() { return i; };
                    a();
                } while (i);
                
                let foo = 0;
                for (let i=10; i; i--) {
                    // Bad, function is referencing block scoped variable in the outer scope.
                    var a = function() { return foo; };
                    a();
                }

                Examples of correct code for this rule:

                /*eslint no-loop-func: "error"*/
                /*eslint-env es6*/
                
                var a = function() {};
                
                for (var i=10; i; i--) {
                    a();
                }
                
                for (var i=10; i; i--) {
                    var a = function() {}; // OK, no references to variables in the outer scopes.
                    a();
                }
                
                for (let i=10; i; i--) {
                    var a = function() { return i; }; // OK, all references are referring to block scoped variables in the loop.
                    a();
                }
                
                var foo = 100;
                for (let i=10; i; i--) {
                    var a = function() { return foo; }; // OK, all references are referring to never modified variables.
                    a();
                }
                //... no modifications of foo after this loop ...

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

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

                                    $input.data('beforeVal') == null ||

                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

                            if ($picker != null) {

                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 ($input != null && $picker.data('isInline') === false) { // Float mode

                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(changePoint == "calendar"){

                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

                                    ( $input.data('beforeVal') != null && $input.data('beforeVal') != $input.val())    )

                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

                                    ( $input.data('beforeVal') != null && $input.data('beforeVal') != $input.val())    )

                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

                                    if($picker.data("inputObjectId") != null && $picker.data("isInline") === false && $picker.css('display') != 'none'){

                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( m != null){

                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

                        if(date == null){

                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

                        if (allowWdays == null || isObj('Array', allowWdays) === false || allowWdays.length <= 0) {

                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(allowWdays != null && allowWdays.length <= 6) {

                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 ((maxDate == null) || (maxDate > cDate.getTime())) {

                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

                                    ((minDate != null) && (minDate > realDayObj.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime()))

                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

                            if ($picker != null) {

                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 (format_before_c != format_c) {

                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 isCurrentDay = isCurrentMonth && todayDate.getDate() == date.getDate();

                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(changePoint == "calendar"){

                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 (isCurrentMonth && realDay == todayDate.getDate()) { /* today */

                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

                        if (opt.inputObjectId != null) {

                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($(input).val() != null && $(input).val() !== ""){

                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

                            if (func != null) {

                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/

                Missing radix parameter.
                Open

                                        year = parseInt(d) + 2000;

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

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

                                    } else if(f == 'DD' || f == 'D'){

                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

                                    } else if(f == 'mm' || f == 'm'){

                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

                        if ($link_before_month != null) {

                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(allowWdays != null) {

                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 (hour_ == date.getHours() && min_ == date.getMinutes()) { /* selected time */

                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

                            if ($picker != null) {

                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 ($picker.data("inputObjectId") != null) {

                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/

                Missing radix parameter.
                Open

                            return parseInt(year) + parseInt(date.getFullYear().toString().substr(0, 2) + "00");

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

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

                        if (allowWdays == null || isObj('Array', allowWdays) === false || allowWdays.length <= 0) {

                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

                                ((minDate != null) && (minDate > realDayObjMN.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime())) // compare to 00:00:00

                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

                                ((minDate != null) && (minDate > realDayObjMN.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime())) // compare to 00:00:00

                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

                                    ((minDate != null) && (minDate > realDayObj.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime()))

                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 ($input.val() != null && (

                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(ActivePickerId != i){    /* if not-active picker */

                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/

                Missing radix parameter.
                Open

                            if(parseInt($(window).height()) <=  ($input.offset().top - $(document).scrollTop() + input_outer_height + picker_outer_height) ){

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

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

                        var isCurrentYear = todayDate.getFullYear() == date.getFullYear();

                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

                                    } else if(f == 'MM' || f == 'M'){

                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/

                Missing radix parameter.
                Open

                                        month = parseInt(d) - 1;

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

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

                        } else if (year != null) {

                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(oldDate != null){

                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(oldDate.getMonth() != date.getMonth() || oldDate.getDate() != date.getDate()){

                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

                        if ($link_next_month != null) {

                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/

                Don't make functions within a loop.
                Open

                                $td.click(function() {

                Disallow Functions in Loops (no-loop-func)

                Writing functions within loops tends to result in errors due to the way the function creates a closure around the loop. For example:

                for (var i = 0; i < 10; i++) {
                    funcs[i] = function() {
                        return i;
                    };
                }

                In this case, you would expect each function created within the loop to return a different number. In reality, each function returns 10, because that was the last value of i in the scope.

                let or const mitigate this problem.

                /*eslint-env es6*/
                
                for (let i = 0; i < 10; i++) {
                    funcs[i] = function() {
                        return i;
                    };
                }

                In this case, each function created within the loop returns a different number as expected.

                Rule Details

                This error is raised to highlight a piece of code that may not work as you expect it to and could also indicate a misunderstanding of how the language works. Your code may run without any problems if you do not fix this error, but in some situations it could behave unexpectedly.

                Examples of incorrect code for this rule:

                /*eslint no-loop-func: "error"*/
                /*eslint-env es6*/
                
                for (var i=10; i; i--) {
                    (function() { return i; })();
                }
                
                while(i) {
                    var a = function() { return i; };
                    a();
                }
                
                do {
                    function a() { return i; };
                    a();
                } while (i);
                
                let foo = 0;
                for (let i=10; i; i--) {
                    // Bad, function is referencing block scoped variable in the outer scope.
                    var a = function() { return foo; };
                    a();
                }

                Examples of correct code for this rule:

                /*eslint no-loop-func: "error"*/
                /*eslint-env es6*/
                
                var a = function() {};
                
                for (var i=10; i; i--) {
                    a();
                }
                
                for (var i=10; i; i--) {
                    var a = function() {}; // OK, no references to variables in the outer scopes.
                    a();
                }
                
                for (let i=10; i; i--) {
                    var a = function() { return i; }; // OK, all references are referring to block scoped variables in the loop.
                    a();
                }
                
                var foo = 100;
                for (let i=10; i; i--) {
                    var a = function() { return foo; }; // OK, all references are referring to never modified variables.
                    a();
                }
                //... no modifications of foo after this loop ...

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

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

                                if (hour_ == date.getHours() && min_ == date.getMinutes()) { /* selected time */

                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/

                Missing radix parameter.
                Open

                        opt.minTime[0]=parseInt(opt.minTime[0]);

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

                Missing radix parameter.
                Open

                        opt.maxTime[0]=parseInt(opt.maxTime[0]);

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

                Missing radix parameter.
                Open

                            return parseInt(year) + parseInt(date.getFullYear().toString().substr(0, 2) + "00");

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

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

                                if ($.inArray(date.getDay(), allowWdays) == -1) { // Unallowed wday

                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 isCurrentYear = todayDate.getFullYear() == date.getFullYear();

                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(oldDate.getMonth() != date.getMonth() || oldDate.getDate() != date.getDate()){

                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

                            } else if (wday == 6) {/* Saturday */

                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 ($picker != null) {

                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 (hour != null) {

                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 isCurrentMonth = isCurrentYear && todayDate.getMonth() == date.getMonth();

                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

                            } else if (oldDate.getHours() != date.getHours() || oldDate.getMinutes() != date.getMinutes()){

                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 (realDay == date.getDate()) { /* selected day */

                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 is_past_time = hour_ < todayDate.getHours() || (hour_ == todayDate.getHours() && min_ < todayDate.getMinutes());

                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

                                        if (func != null) {

                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

                                while (df_ != null && 0 < df_.length) {

                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

                                    } else if(f == 'MM' || f == 'M'){

                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 ($link_before_month != null) {

                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

                                ((minDate != null) && (minDate > realDayObjMN.getTime())) || ((maxDate != null) && (maxDate < realDayObj.getTime())) // compare to 00:00:00

                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/

                Unexpected alert.
                Open

                            window.alert('destroy!');

                Disallow Use of Alert (no-alert)

                JavaScript's alert, confirm, and prompt functions are widely considered to be obtrusive as UI elements and should be replaced by a more appropriate custom UI implementation. Furthermore, alert is often used while debugging code, which should be removed before deployment to production.

                alert("here!");

                Rule Details

                This rule is aimed at catching debugging code that should be removed and popup UI elements that should be replaced with less obtrusive, custom UIs. As such, it will warn when it encounters alert, prompt, and confirm function calls which are not shadowed.

                Examples of incorrect code for this rule:

                /*eslint no-alert: "error"*/
                
                alert("here!");
                
                confirm("Are you sure?");
                
                prompt("What's your name?", "John Doe");

                Examples of correct code for this rule:

                /*eslint no-alert: "error"*/
                
                customAlert("Something happened!");
                
                customConfirm("Are you sure?");
                
                customPrompt("Who are you?");
                
                function foo() {
                    var alert = myCustomLib.customAlert;
                    alert();
                }

                Related Rules

                Missing radix parameter.
                Open

                        opt.minTime[1]=parseInt(opt.minTime[1]);

                Require Radix Parameter (radix)

                When using the parseInt() function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, parseInt() will autodetect decimal and hexadecimal (via 0x prefix). Prior to ECMAScript 5, parseInt() also autodetected octal literals, which caused problems because many developers assumed a leading 0 would be ignored.

                This confusion led to the suggestion that you always use the radix parameter to parseInt() to eliminate unintended consequences. So instead of doing this:

                var num = parseInt("071");      // 57

                Do this:

                var num = parseInt("071", 10);  // 71

                ECMAScript 5 changed the behavior of parseInt() so that it no longer autodetects octal literals and instead treats them as decimal literals. However, the differences between hexadecimal and decimal interpretation of the first parameter causes many developers to continue using the radix parameter to ensure the string is interpreted in the intended way.

                On the other hand, if the code is targeting only ES5-compliant environments passing the radix 10 may be redundant. In such a case you might want to disallow using such a radix.

                Rule Details

                This rule is aimed at preventing the unintended conversion of a string to a number of a different base than intended or at preventing the redundant 10 radix if targeting modern environments only.

                Options

                There are two options for this rule:

                • "always" enforces providing a radix (default)
                • "as-needed" disallows providing the 10 radix

                always

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071");
                
                var num = parseInt(someValue);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

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

                /*eslint radix: "error"*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                as-needed

                Examples of incorrect code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071", 10);
                
                var num = parseInt("071", "abc");
                
                var num = parseInt();

                Examples of correct code for the "as-needed" option:

                /*eslint radix: ["error", "as-needed"]*/
                
                var num = parseInt("071");
                
                var num = parseInt("071", 8);
                
                var num = parseFloat(someValue);

                When Not To Use It

                If you don't want to enforce either presence or omission of the 10 radix value you can turn this rule off.

                Further Reading

                Use ‘===’ to compare with ‘null’.
                Open

                                if ($input.val() != null && (

                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 ($picker != null) {

                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($picker.data("inputObjectId") != null && $picker.data("isInline") === false && $picker.css('display') != 'none'){

                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/

                Move the invocation into the parens that contain the function.
                Open

                                (function(handler){

                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/

                Move the invocation into the parens that contain the function.
                Open

                 (function($) {

                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/

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

                            } else {/* Next months day */
                                $td.text(realDay - lastDay);
                                $td.addClass('day_another_month');
                                $td.data("dateStr", dateNextMonth.getFullYear() + "/" + (dateNextMonth.getMonth() + 1) + "/" + (realDay - lastDay));
                                realDayObj.setDate( realDay - lastDay );  
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 717..724

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 132.

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

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

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

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

                Refactorings

                Further Reading

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

                            if (firstWday > i) {/* Before months day */
                                $td.text(beforeMonthLastDay + realDay);
                                $td.addClass('day_another_month');
                                $td.data("dateStr", dateBeforeMonth.getFullYear() + "/" + (dateBeforeMonth.getMonth() + 1) + "/" + (beforeMonthLastDay + realDay));
                                realDayObj.setDate(beforeMonthLastDay + realDay);
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 730..737

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 132.

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

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

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

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

                Refactorings

                Further Reading

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

                                $td.hover(function() {
                                    if (! $(this).hasClass('active')) {
                                        $(this).addClass('hover');
                                    }
                                }, function() {
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 875..883

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 92.

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

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

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

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

                Refactorings

                Further Reading

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

                                    $o.hover(function() {
                                        if (! $(this).hasClass('active')) {
                                            $(this).addClass('hover');
                                        }
                                    }, function() {
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 795..803

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 92.

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

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

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

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

                Refactorings

                Further Reading

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

                        show : function( ) {
                            var $input = $(this);
                            var $picker = $(PickerObjects[$input.data('pickerId')]);
                            if ($picker != null) {
                                var handler = new PickerHandler($picker, $input);
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1294..1302
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1321..1329

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 81.

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

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

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

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

                Refactorings

                Further Reading

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

                        hide : function( ) {
                            var $input = $(this);
                            var $picker = $(PickerObjects[$input.data('pickerId')]);
                            if ($picker != null) {
                                var handler = new PickerHandler($picker, $input);
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1285..1293
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1321..1329

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 81.

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

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

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

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

                Refactorings

                Further Reading

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

                        destroy : function( ) {
                            var $input = $(this);
                            var $picker = $(PickerObjects[$input.data('pickerId')]);
                            if ($picker != null) {
                                var handler = new PickerHandler($picker, $input);
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1285..1293
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1294..1302

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 81.

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

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

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

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

                Refactorings

                Further Reading

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

                        draw($picker, {
                            "isAnim": true,
                            "isOutputToInputObject": true
                        }, date.getFullYear(), date.getMonth() + 1, date.getDate(), date.getHours(), date.getMinutes());
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 267..270
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 280..283

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 63.

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

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

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

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

                Refactorings

                Further Reading

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

                        draw($picker, {
                            "isAnim": true,
                            "isOutputToInputObject": true
                        }, date.getFullYear(), date.getMonth() - 1, date.getDate(), date.getHours(), date.getMinutes());
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 280..283
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 300..303

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 63.

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

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

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

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

                Refactorings

                Further Reading

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

                            draw($picker, {
                                "isAnim": true,
                                "isOutputToInputObject": true
                            }, date.getFullYear(), date.getMonth() - 1, date.getDate(), date.getHours(), date.getMinutes());
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 267..270
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 300..303

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 63.

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

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

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

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

                Refactorings

                Further Reading

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

                        gr: {
                            days: ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σα'],
                            months: [ "Ιαν", "Φεβ", "Μαρ", "Απρ", "Μαϊ", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ" ],
                            sep: '-',
                            format: 'DD-MM-YYYY hh:mm',
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 10..18
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 19..27
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 99..107

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 62.

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

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

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

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

                Refactorings

                Further Reading

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

                        ro:{
                            days: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
                            months: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
                            sep: '.',
                            format: 'DD.MM.YYYY hh:mm',
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 10..18
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 99..107
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 108..116

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 62.

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

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

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

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

                Refactorings

                Further Reading

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

                        pl: {
                            days: ['N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'],
                            months: [ "Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień" ],
                            sep: '-',
                            format: 'YYYY-MM-DD hh:mm',
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 10..18
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 19..27
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 108..116

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 62.

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

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

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

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

                Refactorings

                Further Reading

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

                        en: {
                            days: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
                            months: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ],
                            sep: '-',
                            format: 'YYYY-MM-DD hh:mm',
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 19..27
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 99..107
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 108..116

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 62.

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

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

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

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

                Refactorings

                Further Reading

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

                        draw($picker, {
                            "isAnim": true,
                            "isOutputToInputObject": true
                        }, date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes());
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 784..787

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

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

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

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

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

                Refactorings

                Further Reading

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

                                    draw($picker, {
                                        "isAnim": false,
                                        "isOutputToInputObject": true
                                    }, targetDate.getFullYear(), targetDate.getMonth(), targetDate.getDate(), selectedDate.getHours(), selectedDate.getMinutes());
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 249..252

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

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

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

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

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

                Refactorings

                Further Reading

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

                        if(! ((opt.minTime[0] >= 0 ) && (opt.minTime[0] <24 ))){
                            opt.minTime[0]="00";
                        }    
                Severity: Major
                Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js and 3 other locations - About 50 mins to fix
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1001..1003
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1004..1006
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1007..1009

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

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

                        if(! ((opt.maxTime[1] >= 0 ) && (opt.maxTime[1] <24 ))){
                            opt.maxTime[1]="59";
                        }
                Severity: Major
                Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js and 3 other locations - About 50 mins to fix
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 998..1000
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1001..1003
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1004..1006

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

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

                        if(! ((opt.maxTime[0] >= 0 ) && (opt.maxTime[0] <24 ))){
                            opt.maxTime[0]="23";
                        }
                Severity: Major
                Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js and 3 other locations - About 50 mins to fix
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 998..1000
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1004..1006
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1007..1009

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

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

                        if(! ((opt.minTime[1] >= 0 ) && (opt.minTime[1] <60 ))){
                            opt.minTime[1]="00";
                        }    
                Severity: Major
                Found in public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js and 3 other locations - About 50 mins to fix
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 998..1000
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1001..1003
                public/assets/js/core/datetimepicker/jquery.simple-dtpicker.js on lines 1007..1009

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

                There are no issues that match your filters.

                Category
                Status