-
Notifications
You must be signed in to change notification settings - Fork 319
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
Some JSHint fixes #458
Some JSHint fixes #458
Conversation
@@ -126,7 +126,7 @@ exports.findDeadorAlive = function (aModel, aQuery, aUser, aCallback) { | |||
return aCallback(false, null, aRemoved); | |||
} | |||
|
|||
aCallback(false, new model(aRemoved.content), aRemoved); // TODO: Ambiguous | |||
aCallback(false, new aModel(aRemoved.content), aRemoved); // TODO: Ambiguous |
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 probably fixes a bug. Good find.
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.
@jerone since you have appeared to resolve the ambiguity please remove the line note too associated with this fix. Won't be available until tomorrow eve for a little bit but looks good so far. Thanks.
hmmm direct pr checkout out of this doesn't let me edit my profile at http://localhost:8080/users/Marti e.g. it doesn't think that it's me. |
Remaining sequential local merge of current master (50589f1), 451, 455 then 458 causes merge conflict. |
@Martii commented on 1 dec. 2014 08:56 CET:
Will check tonight. Thnx for testing. |
Ok, found the problem: https://github.com/OpenUserJs/OpenUserJS.org/pull/458/files#diff-664f851728e6fc6ec664075df484505cR246 This problem is a little bit bigger then I hoped it was and requires some discussion (not here) about a real solution. Because of that I'll revert all Some reading: |
Needs master merge as I said above at #458 (comment) and complete retesting here. |
…into jshint Conflicts: controllers/admin.js controllers/user.js
I appear not to "own" my script at http://localhost:8080/scripts/Marti/uso_-_Count_Issues/source e.g. it says "Submit Code as Fork" instead of "Submit Code". |
Leave all equality checks alone. When |
I kind of figured that... but I thought I'd give JSHint one last try... I'd still rather see these things split up into smaller chunks... e.g. we do need the semicolon fixes and probably a few other misc TODO fixes... but in separate PRs... I'd do cherry picking distinct commits but that is on hold since it allows chaining changes which sometimes those might need to be discussed first. Anywho my fakes3 crashed in another console tab which is why I was having issues a few moments ago... reverted that system level patch and it's okay now. |
@@ -122,7 +121,7 @@ exports.callback = function (aReq, aRes, aNext) { | |||
if (openIdStrategies[strategy]) { | |||
strategyInstance._verify = function (aId, aDone) { | |||
verifyPassport(aId, strategy, username, aReq.session.user, aDone); | |||
} | |||
}; |
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.
+1 here
@@ -50,7 +50,7 @@ function removeable(aModel, aContent, aUser, aCallback) { | |||
exports.removeable = removeable; | |||
|
|||
function remove(aModel, aContent, aUser, aReason, aCallback) { | |||
var remove = new Remove({ | |||
var removeModel = new Remove({ |
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.
-0+ here... JSHint specific I think.
@jerone |
I reverted all |
@@ -234,7 +233,6 @@ exports.getMeta = function (aChunks, aCallback) { | |||
// get the user script header. | |||
var str = ''; | |||
var i = 0; | |||
var len = aChunks.length; | |||
var header = null; | |||
|
|||
for (; i < aChunks.length; ++i) { |
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.
Just as a FYI I see an incomplete optimization from someone here which is why JSHint plucked line 237 out.
Fully retested on dev usage at this point... just need only a PR READY when you are and I'll give it a +1 |
Handled code issues:
all==
and!=
to===
and!==
.isPro
,isDev
&isDbg
).a
parm lists #267 at 82dc007#diff-590bb4d75f87edbecb61fa8487493291L123Not handled:
isPro
,isDev
&isDbg
. +/-90% of the files have one these unused variables…User.edit
still contains a lot of bugs, but this function is never used.No functionality should have been changed!
Node modules are ignored.
Ref #406
A change to get the code to a higher level of quality and consistency.