I’ve created this thing called restrict mode for JavaScript. It’s a definition of a proper subset of the language which I believe is great because I think it increases robustness and makes your program more easy to reason about. Check outthe case for restrict mode if you'd like to read more about the rationale for creating it.
I want to know how well the restrict mode subset of JavaScript matches existing well written programs. My hope is to find that the benefit/cost ratio is high. I tried it on v8bench and JSLint in the past (with great results), and now recently jQuery. I documented my findings here: Seems like restrict mode found us a jQuery bug.
Very few changes (less than a dozen lines) were required to get jQuery restrict mode clean. One of those changes is a bugfix to jQuery.fn.hasClass. Let me know if you want to me to report the bug somewhere else or create a test case for it. You'll find the patch here. It applies cleanly against d59b0f3e27827d189b8b2595142ec6bbc3941dd9.
This is not a proposal for you to keep jQuery restrict mode clean from now on by applying my patch and running restricter on your unit tests. I'm fine if you don't. But perhaps it sparkled some interest in the benefits of restrict mode and some thoughts about which particular subset of JS you're using. What I wish for the most is feedback on restrict mode so I'm happy to hear any thoughts you may have.