开发者

Dojo lint - Are there any good lint tools for Dojo, not just javascript

开发者 https://www.devze.com 2023-04-06 10:02 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消