Fork me on GitHub

JSLint Error Explanations

JSLint will hurt your feelings. It's time to make them better!


ES5 option is now set per default

When do I get this error?

JSHint (since version 2.0.0) will throw the "ES5 option is now set per default" error when it encounters the es5 JSHint option with a value of true. Here's an example in which we set the es5 option so we can use reserved words as property identifers (which was not allowed in ES3):

Why do I get this error?

This error is rasied to highlight a pointless piece of code. If you're using JSHint 2.0.0 or above, the es5 option will be set to true by default, due to the fact that environments supporting the ES5 spec are now far more widespread.

You can simply remove the option from any JSHint directives or .jshintrc files. Select JSHint version 1.1.0 or below in the following example to see the difference from when the es5 option was not on by default:

In JSHint 1.0.0 and above you have the ability to ignore any warning with a special option syntax. Since this is an informational JSHint message, it cannot be disabled.


comments powered by Disqus