even more jshint compliance

pull/1/head
ansuz 9 years ago
parent 3cb94b8d80
commit 278c4ab32f

@ -14,7 +14,9 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
var WebSocket = require('ws');
// triggers jsh because we're not in a browser and WebSocket is a thing
var WebSocket = require('ws'); // jshint ignore:line
var REGISTER = 0; var REGISTER = 0;
var REGISTER_ACK = 1; var REGISTER_ACK = 1;
@ -60,7 +62,7 @@ var sendChannelMessage = function (ctx, channel, msg, cb) {
try { user.socket.close(); } catch (e) { } try { user.socket.close(); } catch (e) { }
} }
}); });
cb && cb(); if (cb) { cb(); }
}); });
}; };
@ -184,7 +186,7 @@ var create = module.exports.create = function (socketServer, store) {
} }
}); });
socket.on('close', function (evt) { socket.on('close', function (evt) {
for (client in ctx.registeredClients) { for (var client in ctx.registeredClients) {
if (ctx.registeredClients[client].socket === socket) { if (ctx.registeredClients[client].socket === socket) {
dropClient(ctx, client); dropClient(ctx, client);
} }

@ -1,3 +1,6 @@
/*
globals module
*/
module.exports = { module.exports = {
// the address you want to bind to, :: means all ipv4 and ipv6 addresses // the address you want to bind to, :: means all ipv4 and ipv6 addresses

@ -1,3 +1,6 @@
/*
globals define
*/
define([ define([
'/bower_components/jquery/dist/jquery.min.js' '/bower_components/jquery/dist/jquery.min.js'
], function () { ], function () {

@ -1,3 +1,6 @@
/*
globals define console
*/
require([ require([
'/customize/DecorateToolbar.js', '/customize/DecorateToolbar.js',
'/bower_components/jquery/dist/jquery.min.js' '/bower_components/jquery/dist/jquery.min.js'

@ -1,3 +1,6 @@
/*
globals require
*/
require([ require([
'/customize/DecorateToolbar.js', '/customize/DecorateToolbar.js',
'/bower_components/jquery/dist/jquery.min.js' '/bower_components/jquery/dist/jquery.min.js'

@ -1,3 +1,6 @@
/*
globals require console
*/
var Express = require('express'); var Express = require('express');
var Http = require('http'); var Http = require('http');
var Https = require('https'); var Https = require('https');

@ -34,7 +34,7 @@ module.exports.create = function(conf, cb){
return a.id - b.id; return a.id - b.id;
}); });
db.filter(function(val){ db.filter(function(val){
return val.chan == channelName; return val.chan === channelName;
}).forEach(function(doc){ }).forEach(function(doc){
cb(doc.msg); cb(doc.msg);
}); });

Loading…
Cancel
Save