| Subject: | [Dev] Lint plugin | |
|---|---|---|
| From: | Dave Methvin (dave...@gmail.com) | |
| Date: | Dec 28, 2006 10:55:04 am | |
| List: | com.googlegroups.jquery-dev | |
Refine Search
| From | Sent On | Attachments |
|---|---|---|
| Dave Methvin | Dec 28, 2006 10:55 am | |
| Yehuda Katz | Dec 28, 2006 11:08 am | |
| Dave Methvin | Dec 28, 2006 11:46 am | |
| Mike Alsup | Dec 28, 2006 11:52 am | |
| Yehuda Katz | Dec 28, 2006 12:18 pm | |
| John Resig | Dec 28, 2006 12:46 pm | |
| Jörn Zaefferer | Dec 28, 2006 1:56 pm |
| Subject: | [Dev] Lint plugin | |
|---|---|---|
| From: | Dave Methvin (dave...@gmail.com) | |
| Date: | Dec 28, 2006 10:55:04 am | |
| List: | com.googlegroups.jquery-dev | |
I have been thinking about extending John's debug plugin to do something similar to lint to catch things like these:
- Use of deprecated methods - Clearing all event handlers rather than just your own - Using DOM methods/properties on jQuery objects - Strict argument checking - Inefficient selectors like $(":input") or $("div#id") - Selectors that don't return any elements - Selectors with bad syntax or obsolete functions
Not all of them are outright errors but the goal is to point out potential problems or cleaner/safer/faster ways to do things, especially for novices. Like John's original plugin, it would wrap around the existing api and not require any code to be inserted into the jQuery source.
Any ideas for a plugin like this?

