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

This page lists all of the options available to you when configuring your tool of choice and attempts to explain exactly what each option does. If you were searching for explanations of error messages you can have a look over here instead.

  • 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   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   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…

  • 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…

  • 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   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   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…

  • 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   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…

  • 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…