简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM