-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Use grunt-jscs over deprecated grunt-jscs-checker #2030
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
Conversation
The NPM package `grunt-jscs-checker` was renamed `grunt-jscs` See jscs-dev/grunt-jscs#53
The Travis CI build fails due to the errors I've outlined above. |
Thanks for the PR! Those rules are accurate, it's just that we have a lot of old code that doesn't adhere to our code style standards. It seems to be a quite amount of work to correct all these style violations, that's mostly why it hasn't been done yet. I think we'd be happy if someone was willing to correct those violations. :) But I'll defer to @markelog here, who's one of JSCS maintainers. |
Yeah, we specifically do not update jscs until it starts find all possible inconsitencies so we could fix them all in one swift motion. Thank you for the pull though! |
The 64 whitespace changes ( 2 per rule) are here if your interested for reference. Thanks for the feedback y'all, I think I've got my head around JSCS enough now, wanted to play in a real repo before starting on adding support for JSCS to WordPress' develop repo. 😖 |
I can indeed, I'll take a look at said
Thus the question here is, based on the above comment and per the original pull request it should be fine to now bump the deprecated |
I'll let someone that maintains this repo give the definitive answer, but from my side the answer is yes. |
Code-style updates are tedious so if you want it to do it for us, then hooray! :-). However, jscs dependency update is another story. It seems we soon update the guide - jquery/contribute.jquery.org#104 by simplifying it. After that, jscs could fully support it. Since core uses fixed dependencies we would need to do another commit bump in the week or so. So i would wait until that time and do it in one action. |
I'll wait until your team has made the decisions linked above, I see no point in spending time here creating and submitting a pull request with white space changes if your about to change those recommendations. I also don't see the point in using an out of date grunt JSCS tool ( |
Discussion about the code-style changes are not conflicted with https://github.com/ntwb/jquery/commit/f5c217beaf43614609c0b5d21d8cd0c630bcc3ba, therefore you PR will be accepted if you choose to submit it.
See above of why i think we should wait until the next version of jscs. |
Right, those already enforced by currently used version |
Pull requested submitted with JSCS code-style updates. If you don't want to update to use Edit: Without updating to |
Yeah, i precisely know what changed, since i checked sizzle and core repos before i maid those releases. There is really no hurry to update jscs until it could fully support jquery code-style, after that we could this update across all projects. But of course, this is just little guy opinion :-), so if we all want to update it now and do the same again soon i'm all for it. |
I disagree with this statement, there are improvements available now without regressions. |
FWIW, I agree with @ntwb that since he already has a patch fixing white space issues it'd be better to update JSCS to a newer version so that we're sure we won't introduce newer ones (I know I've already done it in one commit!). |
My point is, we would need to update jscs soon, so why not wait a bit and not make extra commit. |
I see your point, it's just until everything is implemented you never know how soon it is. :) I'm a little afraid about the Node situation where "soon" for 0.12 started at the end of 2013. Since we already have a patch that makes it compatible with latest JSCS, I'm not too worried about bumping JSCS soon again. Unless you have a strong opinion on that. :) |
The point is my pull request uses Contributing to jQuery should not be this hard, I'm done here, work it out amongst yourselves. |
The NPM package
grunt-jscs-checker
was renamedgrunt-jscs
, thusgrunt-jscs-checker
is now deprecated.See jscs-dev/grunt-jscs#53
Switching to
grunt-jscs
v1.2.0 overgrunt-jscs-checker
v0.8.1 results in ~126 errors, all the errors are for spaces around square brackets e.g.Rather than patching each of these files at this stage (happy to if this is in fact the desired coding standard) though I thought I should check if the current rules based in the jQuery presets are preseumed to be accurate in JSCS's jQuery presets file https://github.com/jscs-dev/node-jscs/blob/master/presets/jquery.json, in particular both of these settings:
"requireSpacesInsideObjectBrackets": "all",
- JSCS Docs disallowSpacesInsideObjectBrackets / requireSpacesInsideObjectBrackets"requireSpacesInsideArrayBrackets": "all",
- JSCS Docs disallowSpacesInsideArrayBrackets / requireSpacesInsideArrayBrackets