[jquery-dev] Re: jQueryLINT

2010-01-18 Thread Dave Methvin
Let me summarize this thread so far. DBJ brought up the idea of a lint for jQuery, which comes up a few times a year. I mentioned I had posted about that in 2006 and didn't finish any code to do it. A few people said it was a horrible idea and they would never use it. Others said they liked the id

Re: [jquery-dev] Re: jQueryLINT

2010-01-17 Thread Andrea Raimondi
On Mon, Jan 18, 2010 at 1:23 AM, James Padolsey wrote: > I don't think we can attribute the idea to any one person though. As > Matt mentioned, this topic comes up every few months, from various > individuals. I haven't followed all threads about this topic, but it seems we got pretty in-depth wi

[jquery-dev] Re: jQueryLINT

2010-01-17 Thread James Padolsey
You're right. I just added this thread URL to the source. I don't think we can attribute the idea to any one person though. As Matt mentioned, this topic comes up every few months, from various individuals. Also, what's with the "you have to" attitude. Politeness isn't overrated, ya know... On J

[jquery-dev] Re: jQueryLINT

2010-01-17 Thread DBJDBJ
James, In your source You have to mention whose idea was this And where have you found out about it : this forum + this thread ... Thanks : DBJ On Jan 17, 9:22 pm, James Padolsey wrote: > Yesterday, after seeing this thread, I started work on a "jQuery Lint" > script. You can see it here:h

[jquery-dev] Re: jQueryLINT

2010-01-17 Thread James Padolsey
Yesterday, after seeing this thread, I started work on a "jQuery Lint" script. You can see it here: http://github.com/jamespadolsey/jQuery-Lint It does a few basic checks - argument signatures being the main one. It also tries to combat lack-of-caching with selections, and it will warn you when yo

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread Diego Perini
Yes a temporary wrapper is better... and useful for other things too. Diego On 16 Gen, 01:16, DBJDBJ wrote: > How about a proxy (aka mediator, aka facade ) pattern ? > Let us call that "facade" : jQLint. An facade to the real jQuery > behind . Let's call its instance: $$ > > // inside jQlint > (

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread DBJDBJ
How about a proxy (aka mediator, aka facade ) pattern ? Let us call that "facade" : jQLint. An facade to the real jQuery behind . Let's call its instance: $$ // inside jQlint (function ( window, undefined ) { // Define a local copy of jQLint var jQLint = function( selector, context ) {

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread Diego Perini
Jason, maybe I have attributed to Dave something that was actually said by DBJ ... sorry in that case. I am just against inclusion in core and against the inclusion of any mechanism for that scope in general. As said, if the tool is an external and independent "Lint-like" solution I don't see any

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread DBJDBJ
Of course by "first" I meant: first , but only on this latest thread. This is just the latest incarnation of the idea which is not mine... -- DBJ -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-.

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread DBJDBJ
@Jason: yes , you are (also) right, and also : > > I think you're still not quite understanding what Dave is suggesting. > Funny .. I could swear it was I who suggested this first ;o) --DBJ -- You received this message because you are subscribed to the Google Groups "jQuery Development" group.

Re: [jquery-dev] Re: jQueryLINT

2010-01-15 Thread Andrea Raimondi
On Fri, Jan 15, 2010 at 8:11 PM, Scott Sauyet wrote: > I think you miss the point.  This would not be a production version of > jQuery.  It would be either a stand-alone jquery version, called IME, that's a big red flashing "ALERT!" sign with white bulbs around it! Something that isn't meant

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread Matt
On Jan 15, 1:11 pm, Scott Sauyet wrote: > I like the idea, and I think it would be possible to do this as a > plug-in, which replaces calls to jQuery functions with calls that > check the parameters, store errors, then delegate to the the original > function.  But have no time at the moment to hel

Re: [jquery-dev] Re: jQueryLINT

2010-01-15 Thread Scott Sauyet
On Fri, Jan 15, 2010 at 2:11 PM, Jason Persampieri wrote: > I think you're still not quite understanding what Dave is suggesting. Timing! :-) -- Scott -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email t

Re: [jquery-dev] Re: jQueryLINT

2010-01-15 Thread Scott Sauyet
On Fri, Jan 15, 2010 at 2:02 PM, Diego Perini wrote: > Why should we inflict these no sense conditionals onto everybody. > Should we then check every parameter of every method too, just to be > helpful to one people not remembering signatures or lazy to lookup a > documentation page ? I think you

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread Jason Persampieri
Diego, I think you're still not quite understanding what Dave is suggesting. He is *not* saying everyone running jQuery would be subjected to these checks. He *is* saying there is a completely new build of jQuery (let's call it jQuery-1.4.lint.js) that a developer could *choose* to run against j

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread Diego Perini
Dave, I completely agree with Andrea Raimondi above and everything he said make sense to me. Why should we inflict these no sense conditionals onto everybody. Should we then check every parameter of every method too, just to be helpful to one people not remembering signatures or lazy to lookup a d

Re: [jquery-dev] Re: jQueryLINT

2010-01-15 Thread Julian Aubourg
I so agree with you here, Dave. Design by contract is all I have to say. 2010/1/15 Dave Methvin > > "Not technically demanding" uh? > > I beg to differ on this one. > > Conceptually it's a simple idea: Inspect the parameters being passed > to jQuery and its methods, then see if they match the A

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread DBJDBJ
@Dave : thanks, you got it right Also, jQueryLINT is not a plugin, it is version of jQuery itself. With checks all over the place inside ... If that effort is owned by jQuery team and efforts channelled, this should be a great help for addressing the user related issues ... And this will make ever

[jquery-dev] Re: jQueryLINT

2010-01-15 Thread Dave Methvin
> "Not technically demanding" uh? > I beg to differ on this one. Conceptually it's a simple idea: Inspect the parameters being passed to jQuery and its methods, then see if they match the API signature and follow good practice. I started on it years ago but punted (hides head in shame) because it