JSHint and whitespace

Antranig Basman antranig.basman at colorado.edu
Fri Apr 11 23:42:39 UTC 2014

As Justin and I observed in the IRC channel today, jshint has removed all options and capabilities relating 
to whitespace.

The developer explains that this change is permanent and complete:


I was unable to find the blog posting he refers to in the transcript in which he claims he announced this 

He recommends a tool named "jscs" for stylistic issues including whitespace. We could consider adding a 
further grunt task for this (at the cost of making our somewhat slow lint checking yet slower). It also has 
a SublimeText plugin


Unfortunately this tool is bristling with options in which it seems unprofitable to make a great investment. 
Another option is to freeze the version of jshint we use at an earlier revision which had support both for 
"ignore" as well as "trailing" -

It appears that this feature ("ignore") was added at revision
of about 6 months ago

whereas the block of commits which started to remove whitespace support started only a few weeks ago at 
March 26th, for example


This leaves a substantial window of jshint releases which should be good for us - say from 2.2.0 up to 2.4.4

Personally I'm in favour of this option since I don't suppose we really want a linter that is a "moving 
target" - should we have once succeeded in linting a file with particular options we don't really want fresh 
issues emerging or old checks failing.

Alternatively we could abandon the expectation of regularity in whitespace, with the risk that abominations 
such as my occasional 3-space indents and rampant trailing whitespace start to proliferate once more :)


More information about the fluid-work mailing list