-
Notifications
You must be signed in to change notification settings - Fork 20.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make code grunt-contrib-jshint 0.3.0 compatible #1203
Conversation
Note that I had to switch to false both the |
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != | ||
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) | ||
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== | ||
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @jaubourg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one will work because it changes the numbers to strings, but will probably increase file size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably will but so does using triple = instead of double in most places and many such cases are not, strictly speaking, required for the code to work. And since this is one of very few places were !=/== exist and current .jshintrc configuration forbids it...
If you decide to not change it then it should at least be surrounded by jshint comment blocks disabling the eqeqeq option.
I personally find the code taking advantage of function hoisting to be more readable and better organized. It might be time to try undef:true and latedef:false, per jshint/jshint#424 (comment), which would eliminate the need for these large block moves. |
Ok, I'll check how it works tomorrow. |
I updated the pull request according to review comments; most changes were, indeed, not needed. It seems everything works fine after an update to grunt-contrib-jshint 0.2.0 now so I updated it in package.json, too. @rwldrn & @gibson042: as for the |
It is appropriate to keep the strict |
Sure, I'll do it within a few hours. BTW, jsHint >= 1.0 used by this upgraded grunt-contrib-jshint allows using space between
Seems more in line with jQuery liberal spacing policy. |
Yeah, I like it. |
I cleaned up jsHint conf options: |
Please note that for this code to build you must still use node 0.8.x, not 0.10.0 as long as pull request #1202 is not pulled in. |
Ah, I also removed the |
I created an analogous pull request for |
We can always turn on |
That's exactly what I did in #1204. Of course, another option is to turn off |
Rebased to Also, restored the |
BTW, if/when you merge this one I'll rebase all my other pull requests so that they can be checked against the newest jsHint version. |
Re-based to master and corrected some recently added leading white spaces which made grunt fail after re-basing. Any chance of merging it soon so that new such mistakes aren't introduced? |
I made analogous updates to pull request #1204 |
Re-based to master. Most of changes from this pull request has been already merged in commit 1205103 but a few remain. |
@dmethvin, I've just rebased this one to master so that only the remaining parts are to be merged. There are only a few differences related mostly to comparisons with |
I've just run the full unit test suite from this branch on IE9 and are all passed. |
Well, the commit description on the rebased one is now a little outdated but you can change it when merging anyway. |
No description provided.