vurdevil.blogg.se

Jshint
Jshint




jshint jshint

There are multiple ways to configure jshint, the preferred way is to create a json configure file called. Run jshint static analysis on foo.js jshint foo.js While jslint languished, the jshint is being actively developed.īoth tools can be easily setup using nodejs, but I prefer jshint myself: npm install -g jshint Only gulp, gulp-jscs, and gulp-jshint are required but I like notifications. npm install -save-dev gulp gulp-jscs gulp-jshint jshint-stylish gulp-notify gulp-notify-growl. Static JavaScript checking, due to its author Douglas Crockford being an early very influential author. After those packages finish installing, make sure you are in the root of your test app and execute the following.

jshint

This leads to broken code discovered in production.įortunately, a combination of static analysis plus unit tests solves the majority of problems that a typical compiler would find out. Which means there is no compiler to check if every variable is declared, Obvious: JavaScript is an interpreted language without compile step.






Jshint