jQuery Lint 驗證工具
January 20th, 2010 in Web Design.

做 web development 的人應該都會用過 JSLint 或 JSONLint 這些線上驗證工具。日前連 jQuery Lint 也出爐了。 jQuery Lint 的目的也是提供一個工具協助 programmer 寫出更好的 jQuery code(例如 $(el).css(...).css(...).css (...) 可簡化成 $(el).css({...}) )。
跟 JSLint 和 JSONLint 不同, jQuery Lint 是個 run time reporter,安裝後所有訊息會顯示在 FireBug 上。安裝 jQuery Lint 只需加如下一句:
<script src="jquery.lint.js"></script>
jQuery Lint 提供的訊息頗為詳盡,除了簡單錯誤報告外,還提供修改建議、問題代碼、甚至相關的 method signatures 。
下載及 API 請到 http://github.com/jamespadolsey/jQuery-Lint