JSLint and the popular alternatives JSHint and ESLint are brilliant tools that make your code more consistent. But sometimes it's hard to understand exactly what they're asking you to change. JSLint goes so far as to be proud of the fact that it will "hurt your feelings".

JSLint Error Explanations is designed to help you improve your JavaScript by understanding the sometimes cryptic error messages produced by JSLint, JSHint and ESLint, and teaching you how to avoid such errors.

  • JSLint JSHint ESLint {a} is already defined

    The "{a} is already defined" error is thrown when JSLint or JSHint encounters a declaration with an identifier that has been used in a previous declaration. This applies to both variab…

    Also known as

    • W004
  • JSLint JSHint ESLint The array literal notation [] is preferrable

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint and JSHint prior to version 1.0.…

    Also known as

    • Use the array literal notation []
    • W009
  • JSLint JSHint ESLint Avoid arguments.{a}

    The "Avoid arguments.{a}" error is thrown when JSLint, JSHint or ESLint encounters a reference to the callee or caller property of an arguments object. The text of this warning can the…

    Also known as

    • W059
  • JSLint JSHint ESLint Bad assignment

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint and JSHint the warning given has…

    Also known as

    • Invalid left-hand side in assignment
    • E031
  • JSLint JSHint Bad constructor

    The "Bad constructor" error is thrown when JSLint or JSHint encounters the new operator followed by a literal value. In the following example we are attempting to apply the new operato…

    Also known as

    • W056
  • JSLint JSHint Variable {a} was not declared correctly

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint and JSHint prior to version 2.1.…

    Also known as

    • You might be leaking a variable ({a}) here
    • W120
  • JSLint JSHint ESLint Bad for-in variable '{a}'

    This warning has existed in several forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint and JSHint prior to version…

    Also known as

    • Creating global 'for' variable
    • Invalid left-hand side in for-in
    • W088
  • JSHint ESLint Value of '{a}' may be overwritten in IE8 and earlier

    The "Value of '{a}' may be overwritten in IE8 and earlier" error is thrown when JSHint or ESLint encounters a try...catch statement in which the catch identifier is the same as…

    Also known as

    • W002
  • JSLint JSHint Combine this with the previous 'var' statement

    This warning has existed in two forms in JSLint and JSHint. It was introduced in JSLint in June 2011 and has remained in both tools ever since. In JSLint the warning given is "Combine this with the previous…

    Also known as

    • Too many var statements
    • W081
  • JSLint JSHint Confusing minuses

    This warning has existed in a few forms in both JSLint and JSHint. It was introduced in the original version of JSLint and has remained in both tools ever since. In JSHint prior to version 1.0.0 the warning give…

    Also known as

    • W006
  • JSLint JSHint Confusing pluses

    This warning has existed in a few forms in both JSLint and JSHint. It was introduced in the original version of JSLint and has remained in both tools ever since. In JSHint prior to version 1.0.0 the warning give…

    Also known as

    • Confusing plusses
    • W007
  • JSHint const '{a}' has already been declared

    The "const '{a}' has already been declared" error is thrown when JSHint encounters a constant declaration with an identifier that has already been used in a previous constant d…

    Also known as

    • E011
  • JSLint JSHint ESLint Unexpected dangling '_' in '{a}'

    The "Unexpected dangling '_' in '{a}'" error is thrown when JSLint, JSHint or ESLint encounters an identifier that begins or ends with the underscore character. JSHint…

    Also known as

    • W105
  • JSLint JSHint ESLint All 'debugger' statements should be removed

    This warning has existed in various forms in JSLint, JSHint and ESLint. It was introduced in the original version of JSLint and has remained in all three linters ever since. In JSLint the warning given is "…

    Also known as

    • Forgotten 'debugger' statement?
    • Unexpected 'debugger'
    • Unexpected 'debugger' statement
    • W087
  • JSLint JSHint ESLint ['{a}'] is better written in dot notation

    The "['{a}'] is better written in dot notation" error is thrown when JSLint, JSHint or ESLint encounters an attempt to access a property using a string literal within a pair of…

    Also known as

    • W069
  • JSLint JSHint ESLint Duplicate key '{a}'

    This warning has existed in three forms in JSLint, JSHint and ESLint. It was introduced in the original version of JSLint and has remained in all three linters ever since. In JSLint the warning given is the gene…

    Also known as

    • Duplicate member '{a}'
    • W075
  • JSLint JSHint ESLint Empty class

    The "Empty class" error is thrown when JSLint, JSHint (only versions before 1.0.0) or ESLint encounters a regular expression literal containing an empty character class. The following…

  • JSLint This is an ES5 feature

    This is one of many generic error messages uses by JSLint in a number of situations. Most of these cases are covered in detail by dedicated articles. Following is a list of situations that will…

  • JSHint ES5 option is now set per default

    The "ES5 option is now set per default" error is thrown when JSHint (version 2.0.0 and above only) encounters the es5 option with a value of true. Here's an example in which we set…

    Also known as

    • I003
  • JSLint JSHint ESLint Bad escapement of EOL. Use option multistr if needed

    This warning has existed in various forms across the three main linters. It was introduced in the original version of JSHint and has remained (in a way) in all three tools from some point since. In JSLint the wa…

    Also known as

    • Multiline support is limited to browsers supporting ES5 only
    • W043
  • JSLint JSHint ESLint eval is evil

    This warning has existed in two forms in JSLint, JSHint and ESLint. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint the warning given is "eval i…

    Also known as

    • eval can be harmful
    • W061
  • JSLint JSHint ESLint Do not assign to the exception parameter

    The "Do not assign to the exception parameter" error is thrown when JSLint, JSHint or ESLint encounters an assignment inside a catch block to the identifer associated with that block.…

    Also known as

    • W022
  • JSLint Expected exactly one space between '{a}' and '{b}'

    The "Expected exactly one space between '{a}' and '{b}'" error is thrown when JSLint encounters a number of spaces that is not equal to one in the following situations…

  • JSLint Expected a string and instead saw '{a}'

    The "Expected a string and instead saw '{a}'" error is thrown when JSLint encounters a comparison operator in which one of the operands is a typeof expression and the other ope…

  • JSLint Expected parameter (value) in set '{a}' function

    The "Expected parameter (value) in set '{a}' function" error is thrown when JSLint encounters property setter function in which the first parameter is not named value. In the f…

  • JSHint ESLint Extending prototype of native object: '{a}'

    The "Extending prototype of native object: '{a}'" error, and the alternative "{a} prototype is read only, properties should not be added" error, is thrown when JSHint…

    Also known as

    • {a} prototype is read only, properties should not be added
    • W121
  • JSLint JSHint ESLint Extra comma. (it breaks older versions of IE)

    This warning has existed in various forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint the warning given is the gen…

    Also known as

    • Trailing comma
    • Unexpected ','
    • W070
  • JSLint JSHint ESLint The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype

    The "The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype" error is thrown when JSLint encounters a for-in statement in which the…

    Also known as

    • W089
  • JSLint JSHint ESLint The Function constructor is eval

    This warning has existed in two forms in JSLint, JSHint and ESLint. It was introduced in the original version of JSLint and has remained in all three linters ever since. In JSLint and JSHint prior to version 1.0…

    Also known as

    • The Function constructor is a form of eval
    • W054
  • JSLint JSHint Function statements should not be placed in blocks

    The "Function statements should not be placed in blocks" error (and the alternative "Function declarations should not be placed in blocks" error) is thrown when JSLint or JSH…

    Also known as

    • Function declarations should not be placed in blocks
    • W082
  • JSLint JSHint ESLint Don't make functions within a loop

    The "Don't make functions within a loop" error is thrown when JSLint, JSHint and ESLint encounter a function expression in a for, while or do statement body. In the following examp…

    Also known as

    • W083
  • JSLint JSHint ESLint Use the function form of 'use strict'

    The "Use the function form of 'use strict'" error is thrown when JSLint, JSHint or ESLint encounters a strict mode directive in the outermost scope of the code. In the followin…

    Also known as

    • W097
  • JSLint JSHint get/set are ES5 features

    This warning has existed in two forms across JSLint and JSHint. It was introduced in May 2011 version of JSLint and remained in both tools for a period of time. In JSLint between May 2011 and August 2013 the mes…

    Also known as

    • E034
  • JSHint Option 'validthis' can't be used in a global scope

    The "Option 'validthis' can't be used in a global scope" error is thrown when JSHint encounters the validthis option in a global scope. Here's a silly example in which…

    Also known as

    • E009
  • JSHint 'hasOwnProperty' is a really bad name

    The "'hasOwnProperty' is a really bad name" error is thrown when JSHint encounters an assignment to an object property with the identifier hasOwnProperty. This applies to both…

    Also known as

    • W001
  • JSLint JSHint ESLint Implied eval is evil. Pass a function instead of a string

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint and JSHint prior to version 1.0.…

    Also known as

    • Implied eval. Consider passing a function instead of a string
    • W066
  • JSLint JSHint ESLint It is not necessary to initialize '{a}' to 'undefined'

    The "It is not necessary to initialize '{a}' to 'undefined'" error is thrown when JSLint, JSHint or ESLint encounters a variable statement in which the variable is expl…

    Also known as

    • It's not necessary to initialize '{a}' to 'undefined'
    • W080
  • JSHint Invalid typeof value '{a}'

    The "Invalid typeof value '{a}'" error is thrown when JSHint encounters a comparison with a typeof expression on one side and an invalid string literal on the other. In the fol…

    Also known as

    • W122
  • JSLint JSHint Function statements are not invocable. Wrap the whole function invocation in parens

    The "Function statements are not invocable. Wrap the whole function invocation in parens" error (and the alternative "Function declarations are not invocable" error) is throw…

    Also known as

    • Function declarations are not invocable. Wrap the whole function invocation in parens
    • E039
  • JSLint JSHint ESLint A leading decimal point can be confused with a dot: '{a}'

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint versions dated before May 2013 t…

    Also known as

    • A leading decimal point can be confused with a dot
    • W008
  • JSLint JSHint ESLint Do not use {a} as a constructor

    The "Do not use {a} as a constructor" error is thrown when JSLint, JSHint or ESLint encounters a call to String, Number, Boolean, Math or JSON preceded by the new operator. In the foll…

    Also known as

    • W053
  • JSLint JSHint ESLint Missing '()' invoking a constructor

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint the warning given is the generic…

    Also known as

    • W058
  • JSLint JSHint ESLint Missing radix parameter

    The "Missing radix parameter" error is thrown when JSLint, JSHint or ESLint encounters a call to the parseInt function that only has one argument. As of JSHint 2.3.0 the warning will o…

    Also known as

    • W065
  • JSLint JSHint ESLint Missing 'use strict' statement

    The "Missing 'use strict' statement" error is thrown when JSLint, JSHint and ESLint encounter a function that does not contain the strict mode directive, and none of whose ance…

    Also known as

    • E007
  • JSHint Mixed double and single quotes

    The "Mixed double and single quotes" error is thrown when JSHint encounters string literal delimited by double or single quote characters when a string literal delimited by the other h…

    Also known as

    • W110
  • JSLint ESLint Move the invocation into the parens that contain the function

    The "Move the invocation into the parens that contain the function" error is thrown when JSLint and ESLint encounter an immediately invoked function expression in which the invoking pa…

  • JSLint Move 'var' declarations to the top of the function

    The "Move 'var' declarations to the top of the function" error is thrown when JSLint encounters a variable declaration in a for or for-in statement initialiser. Here's an e…

  • JSLint Nested comment

    The "Nested comment" error is thrown when JSLint encounters the character sequence /* inside a multiline comment. Here's an example: /* This is a multiline comment. /* It's…

  • JSLint JSHint ESLint Do not use 'new' for side effects

    The "Do not use 'new' for side effects" error is thrown when JSLint, JSHint or ESLint encounters a function invocation preceded by the new operator when not part of an assignme…

    Also known as

    • W031
  • JSLint JSHint ESLint '{a}' is not a function

    The "'{a}' is not a function" error is thrown when JSLint, JSHint or ESLint encounters an attempt to invoke the Math object as a function. JSLint and ESLint (but not JSHint) wi…

    Also known as

    • W063
  • JSLint JSHint ESLint '{a}' is not a label

    This warning has existed in three forms across the three main linters. It was introduced in the original version of JSLint and has remained (in a way) in all three tools ever since. In JSLint the warning given i…

    Also known as

    • '{a}' is not a statement label
    • Undefined label '{a}'
    • W090
  • JSLint JSHint ESLint '{a}' was used before it was defined

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint the warning given is "'…

    Also known as

    • '{a}' is not defined
    • W117
    • W003
  • JSLint JSHint ESLint The object literal notation {} is preferrable

    This warning has existed in various forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint versions dated May 2013 onwa…

    Also known as

    • The object literal notation {} is preferable
    • Use the object literal notation {}
    • Use the object literal notation {} or Object.create(null)
    • W010
  • JSLint JSHint ESLint Don't use octal: '{a}'. Use '\u...' instead

    This warning has existed in three forms across the three main linters. It was introduced in the original version of JSLint and has remained (in a way) in all three tools ever since. In JSLint the warning given i…

    Also known as

    • Octal literals are not allowed in strict mode
    • W115
  • JSLint JSHint ESLint {a} used out of scope

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In all versions of JSLint and JSHint the w…

    Also known as

    • {a} used outside of binding context
    • W038
  • JSHint Attempting to override '{a}' which is a constant

    The "Attempting to override '{a}' which is a constant" error is thrown when JSHint encounters an assignment expression with an identifer that has been declared in a constant va…

    Also known as

    • E013
  • JSLint JSHint ESLint Read only

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained (in a way) in all three tools ever since. In JSLint and JSHint the warnin…

    Also known as

    • {a} is a read-only native object
    • W020
  • JSHint ESLint Redefinition of '{a}'

    The "Redefinition of '{a}'" error is thrown when JSHint or ESLint encounters a variable declaration with an identifier that is the same as that of a built-in native object. In…

    Also known as

    • W079
  • JSLint JSHint ESLint A regular expression literal can be confused with '/='

    This warning was introduced in the original version of JSLint and existed in the same form in JSHint until version 1.0.0 when it was removed. ESLint has always issued the same warning. When do I get this error? T…

    Also known as

    • E014
  • JSLint JSHint ESLint Spaces are hard to count. Use {a}

    The "Spaces are hard to count. Use {a}" error is thrown when JSLint, ESLint or JSHint (prior to version 1.0.0) encounters a regular expression literal containing two or more consecutiv…

  • JSLint JSHint Expected an identifier and instead saw '{a}' (a reserved word)

    The "Expected an identifier and instead saw '{a}' (a reserved word)" error is thrown when JSLint or JSHint encounters a reference to what should be an identifier but is actuall…

    Also known as

    • W024
  • JSHint ESLint Did you mean to return a conditional instead of an assignment?

    The "Did you mean to return a conditional instead of an assignment?" error, and the alternative "Return statement should not contain assignment", is thrown when JSHint or ESL…

    Also known as

    • Return statement should not contain assignment
    • W093
  • JSLint JSHint ESLint {a} is a statement label

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In all versions of JSLint and JSHint the w…

    Also known as

    • Found identifier with the same name as label
    • W037
  • JSLint JSHint Stopping. ({a}% scanned)

    The "Stopping. ({a}% scanned)" error is thrown when JSLint or JSHint encounters a JavaScript syntax error and cannot continue to reliably parse the program. JSHint will only raise this…

    Also known as

    • E042
  • JSLint The '&&' subexpression should be wrapped in parens

    The "The '&&' subexpressions should be wrapped in parens" error is thrown when JSLint encounters an expression containing both logical 'or' and logical 'and…

  • JSLint Unexpected TODO comment

    The "Unexpected TODO comment" error is thrown when JSLint encounters an attempt to a comment in which the first word is TODO. The regular expression used by JSLint to determine whether…

  • JSHint ESLint This function has too many parameters. ({a})

    This warning has existed in two forms in JSHint and ESLint. It has never existing in JSLint. It was introduced in the r11 version of JSHint and has remained both JSHint and ESLint ever since. In JSHint prior to…

    Also known as

    • Too many parameters per function ({a})
    • This function has too many parameters ({a}). Maximum allowed is {b}
    • W072
  • JSLint JSHint ESLint A trailing decimal point can be confused with a dot: '{a}'

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint versions dated before May 2013 t…

    Also known as

    • A trailing decimal point can be confused with a dot
    • W047
  • JSLint Type confusion: {a} and {b}

    The "Type confusion: {a} and {b}" error is thrown when JSLint (versions dated between June 2011 and July 2011) encounters an attempt to change the type of data assigned to a variable.…

  • JSLint JSHint Unclosed comment

    The "Unclosed comment" error is thrown when JSLint or JSHint encounters a multiline comment that does not end with the character sequence */. Here's an example: /* This is a commen…

    Also known as

    • E017
  • JSLint JSHint Unclosed regular expression

    The "Unclosed regular expression" error is thrown when JSLint or JSHint encounters a regular expression literal with no closing / character. Here's an example: var regex = /^unclos…

    Also known as

    • E015
  • JSLint JSHint Unclosed string

    The "Unclosed string" error is thrown when JSLint or JSHint encounters a a string that is not closed before the next line break or the end of the program. There are numerous situations…

    Also known as

    • E029
  • JSLint JSHint ESLint Unexpected assignment expression

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint, up until July 2013, the warning…

    Also known as

    • Expected a conditional expression and instead saw an assignment
    • W084
  • JSLint Unexpected comment

    The "Unexpected comment" error is thrown when JSLint encounters a single-line or multi-line comment in a JSON string. It will only generate this error when in JSON mode (it enters JSON…

  • JSLint JSHint ESLint Unexpected parameter '{a}' in get {b} function

    This warning has existed in two forms across the three main linters. It was introduced in the original version of JSLint and has remained (in a way) in all three tools ever since. In JSLint and JSHint the warnin…

    Also known as

    • W076
  • JSLint ESLint Unexpected '++'

    This warning has existed in two forms in JSLint and ESLint. It was introduced in the original version of JSLint and has remained in both tools since. It is not present in JSHint. In JSLint the warning given is &…

    Also known as

    • Unexpected '--'
    • Unary operator '++' used
    • Unary operator '--' used
  • JSLint Unexpected sync method: '{a}'

    The "Unexpected sync method: '{a}'" error is thrown when JSLint (versions from March 2012 onwards) encounters an attempt to access a property whose identifier ends with the cha…

  • JSLint JSHint ESLint Unexpected 'with'

    This warning has existed in two forms in JSLint, JSHint and ESLint. It was introduced in the original version of JSLint and has remained in all three linters ever since. In JSLint versions dated July 2013 and la…

    Also known as

    • Don't use 'with'
    • Expected an identifier and instead saw 'with'
    • Unexpected use of 'with' statement
    • W085
  • JSLint JSHint Missing name in function statement

    This warning has existed in three forms across the three main linters. It was introduced in the original version of JSLint and has remained (in a way) in all three tools ever since. In JSLint the warning given i…

    Also known as

    • Missing name in function declaration
    • W025
  • JSLint ESLint Unnecessary 'else' after disruption

    This warning has existed in two forms in JSLint and ESLint. It was introduced in the original version of JSLint and has remained in both tools ever since. It is not present in JSHint. In JSLint versions dated la…

    Also known as

    • Unexpected 'else' after 'return'
  • JSLint Unnecessary escapement

    This warning has existed in two forms in JSLint. It was introduced in the original version and has remained ever since. It is not present in JSHint or ESLint. In JSLint versions dated December 2010 and earlier t…

    Also known as

    • Unexpected '\'
  • JSLint JSHint ESLint Do not wrap function literals in parens unless they are to be immediately invoked

    This warning has existed in two forms across the three main linters. It was introduced in a very early version of JSLint and has remained in all three tools ever since. In JSLint and JSHint prior to version 1.0.…

    Also known as

    • Wrapping non-IIFE function literals in parens is unnecessary
    • W068
  • JSHint ESLint Unnecessary semicolon

    The "Unnecessary semicolon" error is thrown when JSHint or ESLint encounters a semicolon following a block statement or function declaration. In the following example we mistakenly inc…

    Also known as

    • W032
  • JSLint JSHint ESLint Unnecessary 'use strict'

    The "Unnecessary 'use strict'" error (and the alternative "Unnecessary directive '{a}'" error) is thrown when JSLint, JSHint or ESLint encounters a "use…

    Also known as

    • Unnecessary directive "{a}"
    • W034
  • JSLint JSHint ESLint Expected an assignment or function call and instead saw an expression

    The "Expected an assignment or function call and instead saw an expression" error is thrown when JSLint, JSHint or ESLint encounters an expression with no effect. In the following exam…

    Also known as

    • W030
  • JSLint JSHint ESLint Unused '{a}'

    This warning has existed in two forms in JSLint, JSHint and ESLint. It was introduced in the original version of JSLint and has remained in all three linters ever since. In JSLint the warning given is "Unus…

    Also known as

    • '{a}' is defined but never used
    • W098
  • JSLint JSHint ESLint A constructor name should start with an uppercase letter

    The "A constructor name should start with an uppercase letter" error is thrown when JSLint, JSHint or ESLint encounters an identifier, preceded by the new operator, whose first charact…

    Also known as

    • A constructor name '{a}' should start with an uppercase letter
    • W055
  • JSLint JSHint ESLint Use the isNaN function to compare with NaN

    The "Use the isNaN function to compare with NaN" error is thrown when JSLint, JSHint and ESLint encounter a comparison in which one side is NaN. In the following example we attempt to…

    Also known as

    • W019
  • JSLint Use a named parameter

    The "Use a named parameter" error is thrown when JSLint encounters a access a property of the arguments object by numerical index. The following example adds two numbers. Since the fun…

  • JSLint Use the || operator

    The "Use the || operator" error is thrown when JSLint encounters a conditional operator in which the logical expression and first assignment expression are identical. In the following…

  • JSHint ESLint Strings must use {a}quote

    The "Strings must use singlequote" and "Strings must use doublequote" errors are thrown when JSHint or ESLint encounters string literal delimited by double quote characters w…

    Also known as

    • W108
    • W109
  • JSHint A dot following a number can be confused with a decimal point

    The "A dot following a number can be confused with a decimal point" error is thrown when JSHint encounters a numeric literal containing a decimal point as the left-hand-side of a membe…

    Also known as

    • W005
  • JSLint JSHint ESLint Only properties should be deleted

    This warning has existed in two forms in JSLint, JSHint and ESLint. It was introduced in the original version of JSLint and has remained in all three tools ever since. In JSLint the warning given is "Only p…

    Also known as

    • Variables should not be deleted
    • W051
  • JSLint Weird assignment

    The "Weird assignment" error is thrown when JSLint encounters an assignment expression in which the left hand side and right hand side expressions are the same. In the following exampl…

  • JSLint ESLint Weird relation

    This warning has existed in two forms in JSLint and ESLint. It was introduced in the original version of JSLint and has remained in both tools since. It is not present in JSHint. In JSLint the warning given is &…

    Also known as

    • Comparing to itself is potentially pointless
  • JSHint ESLint 'with' is not allowed in strict mode

    This warning has existed in two forms in JSHint and ESLint. It was introduced in the original version of JSLHnt and has remained in both tools since. It does not feature in JSLint. In JSHint the message used is…

    Also known as

    • Strict mode code may not include a with statement
    • E010
  • JSLint JSHint ESLint Wrap an immediate function invocation in parentheses

    The "Wrap an immediate function invocation in parentheses" error is thrown when JSLint, JSHint and ESLint encounter an immediately invoked function expression that is not wrapped in pa…

    Also known as

    • W062
  • JSLint JSHint bitwise

    In JSLint the bitwise option is used to allow the usage of any bitwise operators. In JavaScript the available bitwise operators are << (bitwise left shift), >> (bitwise right shift),…

  • JSHint camelcase

    The JSHint camelcase option is used to force all identifiers (function, variable and property) to either be written in camel case or in uppercase with underscores. It's common convention in…

  • JSHint curly

    The JSHint curly option is used to enforce the use of block statements following the if, for, while and do statements. The language grammar shows that these statements must be followed by anothe…

  • JSHint eqeqeq

    The JSHint eqeqeq option is used to prohibit the use of the equals operator == and the does-not-equal operator !=. This enforces the use of the strict equality operators (=== and !== instead). T…

  • JSHint es3

    The JSHint es3 option is used to tell JSHint that your code will be running in a ECMAScript 3 environment (as opposed to ECMAScript 5, which is the current version of the standard). It was intro…

  • JSLint JSHint forin

    In JSLint the forin option is used to allow the usage of unfiltered for-in statements. Since the for-in statement will enumerate properties from the prototype chain and not just from the object…

  • JSHint freeze

    The JSHint freeze option is used to disallow the extension of native object prototypes. This is often viewed as bad practice and was a relatively common source of bugs in older JavaScript enviro…

  • JSHint immed

    The JSHint immed option is used to enforce the wrapping of immediately invoked function expressions in a pair of parentheses. This prevents the less common use of other operators to force a func…

  • JSLint JSHint indent

    In JSLint and JSHint the indent option is used to enforce a specific tab width in your code. Both tools make their own assumptions about when indentation should occur but are largely identical i…

  • JSHint latedef

    The JSHint latedef option is used to ensure variables and functions are declared before they are used. That is to say, the declarations appear physically in the source code above references to t…