3 ms·
Google, through Closure Tools, and other groups and people have built tools around javascript. For example, JSHint is a pretty good linter and fixjsstyle is a n
by niggler 14y ago
Google, through Closure Tools, and other groups and people have built tools around javascript. For example, JSHint is a pretty good linter and fixjsstyle is a nice little tool to fix formatting. Certainly JS isn't as amenable to static analysis as C, but with time we'll see more.
- jmspring 14y agoWhat you outline is my gripe. Typical NodeJS dev setup amongst those I know: Sublime JSHint JSFormat (or fixjsstyle) To get code to some basis of style consistency. Debugging - node-inspector or console.log In the last six months, node-inspector has gotten a lot better, but a lot of times inserting console.log is just faster (mmm...printfs).
- niggler 14y agoIn many ways it parallels what people do in C: until you get to the scale where precise logging and style enforcement matters, you just forge ahead in the path of least resistance. So like you said, they printf or console.log, use lint or jshint, use -Wall or "use strict" etc. Btw I prefer console.error :)