Cleaner code is always critical. When you are staring at an empty text file, using online tools such as jslint.com and jshint.com is pretty easy. But when your code grows to hundreds or even thousands of lines, constantly copy/pasting the entire contents of your JS file into these tools gets tedious. Some text-editors have great plugins that incorporate linting into your development environment, that that is often a great way to go.
But what if you simply want to do a quick “dummy-check” ?
I just stumbled across jscritic.com by Juriy Zaytsev and found it to be quite helpful for just that purpose.
The sub-title of this tool is: “Quickly check how well 3rd party script behaves.” That promise is kept by the following features:
- Does it browser sniff?
- Does it extend native objects?
- Does it use document.write?
- Does it use eval?
- Does it use ES6 features?
- Does it use Mozilla-only features?
- Does it have IE incompatibilities?
But it is was these tools that really impressed me:
- How many global variables?
- How many unused variables?
- Total size KB
- Minified size