Skip to content

Commit 7304e29

Browse files
committed
Various minor JSHint fixes.
Summary: Various fixes as suggested by JSHint. Test Plan: Eye-balled it. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9783
1 parent 6d51958 commit 7304e29

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

support/aphlict/server/aphlict_server.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ if (process.getuid() !== 0) {
6262

6363
var net = require('net');
6464
var http = require('http');
65-
var url = require('url');
6665

6766
process.on('uncaughtException', function(err) {
68-
debug.log("\n<<< UNCAUGHT EXCEPTION! >>>\n" + err.stack);
67+
debug.log('\n<<< UNCAUGHT EXCEPTION! >>>\n' + err.stack);
6968

7069
process.exit(1);
7170
});
@@ -188,7 +187,7 @@ var receive_server = http.createServer(function(request, response) {
188187
}
189188
});
190189
} else if (request.url == '/status/') {
191-
request.on('data', function(data) {
190+
request.on('data', function() {
192191
// We just ignore the request data, but newer versions of Node don't
193192
// get to 'end' if we don't process the data. See T2953.
194193
});
@@ -213,7 +212,6 @@ var receive_server = http.createServer(function(request, response) {
213212
response.write('400 Bad Request');
214213
response.end();
215214
}
216-
217215
}).listen(config.admin, config.host);
218216

219217
function transmit(msg) {

support/aphlict/server/lib/AphlictFlashPolicyServer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ JX.install('AphlictFlashPolicyServer', {
4646
this._log('<FlashPolicy> Socket Error: %s', error);
4747
},
4848

49-
_log: function(pattern) {
49+
_log: function() {
5050
this._debug && this._debug.log.apply(this._debug, arguments);
5151
},
5252

@@ -60,7 +60,7 @@ JX.install('AphlictFlashPolicyServer', {
6060
'</cross-domain-policy>'
6161
];
6262

63-
return policy.join("\n") + "\0";
63+
return policy.join('\n') + '\0';
6464
}
6565

6666
}

support/aphlict/server/lib/AphlictLog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ JX.install('AphlictLog', {
3232
return this;
3333
},
3434

35-
log: function(pattern) {
35+
log: function() {
3636
var str = util.format.apply(null, arguments);
3737
var date = new Date().toLocaleString();
3838
str = '[' + date + '] ' + str;
@@ -43,7 +43,7 @@ JX.install('AphlictLog', {
4343
}
4444

4545
for (ii = 0; ii < this._writeToLogs.length; ii++) {
46-
this._writeToLogs[ii].write(str + "\n");
46+
this._writeToLogs[ii].write(str + '\n');
4747
}
4848
}
4949

webroot/rsrc/js/application/differential/behavior-comment-jump.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
JX.behavior('differential-comment-jump', function() {
99
function handle_jump(offset) {
10-
return (function(e) {
10+
return function(e) {
1111
var parent = JX.$('differential-review-stage');
1212
var clicked = e.getNode('differential-inline-comment');
1313
var inlines = JX.DOM.scry(parent, 'div', 'differential-inline-comment');
@@ -24,7 +24,7 @@ JX.behavior('differential-comment-jump', function() {
2424
});
2525
JX.DOM.scrollTo(jumpto);
2626
e.kill();
27-
});
27+
};
2828
}
2929

3030
JX.Stratcom.listen('click', 'differential-inline-prev', handle_jump(-1));

webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ JX.behavior('phabricator-remarkup-assist', function(config) {
131131
break;
132132
case 'fa-code':
133133
sel = sel || 'foreach ($list as $item) {\n work_miracles($item);\n}';
134-
var prefix = (r.start === 0) ? '' : '\n';
135-
update(area, prefix + '```\n', sel, '\n```');
134+
var code_prefix = (r.start === 0) ? '' : '\n';
135+
update(area, code_prefix + '```\n', sel, '\n```');
136136
break;
137137
case 'fa-table':
138-
var prefix = (r.start === 0 ? '' : '\n\n');
139-
update(area, prefix + '| ', sel || pht('data'), ' |');
138+
var table_prefix = (r.start === 0 ? '' : '\n\n');
139+
update(area, table_prefix + '| ', sel || pht('data'), ' |');
140140
break;
141141
case 'fa-meh-o':
142142
new JX.Workflow('/macro/meme/create/')

0 commit comments

Comments
 (0)