diff --git a/support/aphlict/server/aphlict_server.js b/support/aphlict/server/aphlict_server.js --- a/support/aphlict/server/aphlict_server.js +++ b/support/aphlict/server/aphlict_server.js @@ -62,10 +62,9 @@ var net = require('net'); var http = require('http'); -var url = require('url'); process.on('uncaughtException', function(err) { - debug.log("\n<<< UNCAUGHT EXCEPTION! >>>\n" + err.stack); + debug.log('\n<<< UNCAUGHT EXCEPTION! >>>\n' + err.stack); process.exit(1); }); @@ -188,7 +187,7 @@ } }); } else if (request.url == '/status/') { - request.on('data', function(data) { + request.on('data', function() { // We just ignore the request data, but newer versions of Node don't // get to 'end' if we don't process the data. See T2953. }); @@ -213,7 +212,6 @@ response.write('400 Bad Request'); response.end(); } - }).listen(config.admin, config.host); function transmit(msg) { diff --git a/support/aphlict/server/lib/AphlictFlashPolicyServer.js b/support/aphlict/server/lib/AphlictFlashPolicyServer.js --- a/support/aphlict/server/lib/AphlictFlashPolicyServer.js +++ b/support/aphlict/server/lib/AphlictFlashPolicyServer.js @@ -46,7 +46,7 @@ this._log(' Socket Error: %s', error); }, - _log: function(pattern) { + _log: function() { this._debug && this._debug.log.apply(this._debug, arguments); }, @@ -60,7 +60,7 @@ '' ]; - return policy.join("\n") + "\0"; + return policy.join('\n') + '\0'; } } diff --git a/support/aphlict/server/lib/AphlictLog.js b/support/aphlict/server/lib/AphlictLog.js --- a/support/aphlict/server/lib/AphlictLog.js +++ b/support/aphlict/server/lib/AphlictLog.js @@ -32,7 +32,7 @@ return this; }, - log: function(pattern) { + log: function() { var str = util.format.apply(null, arguments); var date = new Date().toLocaleString(); str = '[' + date + '] ' + str; @@ -43,7 +43,7 @@ } for (ii = 0; ii < this._writeToLogs.length; ii++) { - this._writeToLogs[ii].write(str + "\n"); + this._writeToLogs[ii].write(str + '\n'); } } diff --git a/webroot/rsrc/js/application/differential/behavior-comment-jump.js b/webroot/rsrc/js/application/differential/behavior-comment-jump.js --- a/webroot/rsrc/js/application/differential/behavior-comment-jump.js +++ b/webroot/rsrc/js/application/differential/behavior-comment-jump.js @@ -7,7 +7,7 @@ JX.behavior('differential-comment-jump', function() { function handle_jump(offset) { - return (function(e) { + return function(e) { var parent = JX.$('differential-review-stage'); var clicked = e.getNode('differential-inline-comment'); var inlines = JX.DOM.scry(parent, 'div', 'differential-inline-comment'); @@ -24,7 +24,7 @@ }); JX.DOM.scrollTo(jumpto); e.kill(); - }); + }; } JX.Stratcom.listen('click', 'differential-inline-prev', handle_jump(-1)); diff --git a/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js b/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js --- a/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js +++ b/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js @@ -131,12 +131,12 @@ break; case 'fa-code': sel = sel || 'foreach ($list as $item) {\n work_miracles($item);\n}'; - var prefix = (r.start === 0) ? '' : '\n'; - update(area, prefix + '```\n', sel, '\n```'); + var code_prefix = (r.start === 0) ? '' : '\n'; + update(area, code_prefix + '```\n', sel, '\n```'); break; case 'fa-table': - var prefix = (r.start === 0 ? '' : '\n\n'); - update(area, prefix + '| ', sel || pht('data'), ' |'); + var table_prefix = (r.start === 0 ? '' : '\n\n'); + update(area, table_prefix + '| ', sel || pht('data'), ' |'); break; case 'fa-meh-o': new JX.Workflow('/macro/meme/create/')