-
Notifications
You must be signed in to change notification settings - Fork 216
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
JS Syntax, and fix selector. #1794
Comments
We use jshint on Kiwi.js - it's good. No objections from me. Anybody else? Sent from my iPhone
|
@jbeales We've actually been using jshint for about 3.5 months - only on new stuff, and only for committers using that workflow/grunt task. We need a CONTRIBUTING.MD, which would clarify/specify that PRs not using the grunt workflow would not be merged. That said - yes, pretty much any front-end JS we have has, last I recall, over 100+ JShint failures/warnings. Lots of the admin JS is much better, but some is not. |
I'll fire up Grunt then and see what it tells me, although a quick glance looks like it just runs JSHint and something for translations. I've also got JSHint turned on in PhpStorm, which is where it's doing most of its yelling. I'll clean up wp-e-commerce.js, it should be pretty quick & easy. |
Awesome. Then let's all start preparing a blog post and a minor release. d Sent from my iPhone
|
I'll see what I can do. Some of those look like a PITA to resolve, (like a possible race condition setting a cookie). |
... and also has some diagnostics built in to help the support folks when they run into odd server configurations that might not be handling cookies the way we need them |
There's a place that I think we're trying to use jQuery to select something with the class
wpsc-visitor-meta
, but the dot is missing. Also, a trailing comma has been removed, (my IDE is yelling at me).Also, JSHint is telling me about a bunch of more stylistic or performance issues in wp-e-commerce.js, such as duplicate variable declarations, duplicate jQuery selectors, (making jQuery do the selection twice instead of doing it once and storing the result in a variable), and unneeded variable assignments, like this:
I'm willing to do a cleanup here, is that something that we would like done, or are there reasons, (like clarity), that to ignore the JSHint warnings?
The text was updated successfully, but these errors were encountered: