Fork me on GitHub

JSLint Error Explanations

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

Stopping. ({a}% scanned)

When do I get this error?

JSLint will throw the "Stopping. ({a}% scanned)" error when it encounters a JavaScript syntax error and cannot continue to reliably parse the program. JSHint will throw this error in the same situation, but only if the passfail option is set to true. In the following example we have half a variable statement which is invalid and cannot be parsed as a complete JavaScript program:

Why do I get this error?

This error is raised to highlight a JavaScript syntax error and the fact that the parser cannot reliably finish parsing your program. Your code will not run unless you fix this error.

The exact cause will depend on your program, but other errors are usually raised along side this one that should guide you to the problem with your code. In our example, the variable statement is missing an identifier:

In JSHint 1.0.0 and above you have the ability to ignore any warning with a special option syntax. Since this message relates to a fatal syntax error you cannot disable it.

James Allardice

This article was written by James Allardice, an enthusiastic young JavaScript developer at Global Personals (we're looking for developers so please apply). He is passionate about writing clean, maintainable JavaScript and uses JSHint every day to help achieve this.

You can follow him on Twitter, fork him on GitHub and find him on Google+.

Proceeds generated by this site are donated to help advance other open source projects

comments powered by Disqus