Dojo lint - Are there any good lint tools for Dojo, not just javascript
I know开发者_开发百科 there are plenty of JavaScript lint tools, but I was wondering if there were any for Dojo also since dojo references cause problems for normal JS lint tools.
Thanks
JSHint handles dojo fine (and even has a little flag for it). I do miss it not checking my provides and requires though*.
Can't you add extra names to the global namespace in your favourite tool?
* Edit: Now with the new async modules, jshint will warn if you forgot to import a module (since its just a regular variable now, instead of a nested object property being accessed). However, it will not warn you if there are unused function arguments (ie, modules being imported needlessly). In my case I hacked the JSHint source code to add a warning to that.
精彩评论