jQuery Lint 驗證工具

做 web development 的人應該都會用過 JSLintJSONLint 這些線上驗證工具。日前連 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

This entry was posted in Web Design and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>