some minor linting elsewhere

v1.18.x
psychobunny 11 years ago
parent 31b2faf2c5
commit 2a2490541f

@ -1,5 +1,5 @@
"use strict";
/*global ajaxify, templates*/
/*global ajaxify, templates, config, RELATIVE_PATH*/
(function(ajaxify) {
ajaxify.widgets = {};

@ -53,7 +53,9 @@ var async = require('async'),
emitter.emit('nodebb:ready');
}
if (callback) callback.apply(null, arguments);
if (callback) {
callback.apply(null, arguments);
}
});
};

@ -98,7 +98,7 @@ module.exports = function(Meta) {
process.exit(0);
}
});
}
};
function minify(source, paths, destination, callback) {
var parser = new (less.Parser)({
@ -114,8 +114,10 @@ module.exports = function(Meta) {
return;
}
var css;
try {
var css = tree.toCSS({
css = tree.toCSS({
cleancss: true
});
} catch (err) {

@ -113,7 +113,9 @@ module.exports = function(Meta) {
}, next);
}
], function(err) {
if (err) return callback(err);
if (err) {
return callback(err);
}
// Convert all scripts to paths relative to the NodeBB base directory
var basePath = path.resolve(__dirname, '../..');
@ -237,7 +239,9 @@ module.exports = function(Meta) {
function getPluginScripts(callback) {
plugins.fireHook('filter:scripts.get', [], function(err, scripts) {
if (err) callback(err, []);
if (err) {
callback(err, []);
}
var jsPaths = scripts.map(function (jsPath) {
jsPath = path.normalize(jsPath);
@ -264,5 +268,5 @@ module.exports = function(Meta) {
Meta.js.scripts.plugin = jsPaths.filter(Boolean);
callback();
});
};
}
};

@ -113,7 +113,7 @@ SocketMeta.rooms.getAll = function(socket, data, callback) {
scores[length] = [tid[1]];
}
} else if (room.match(/^\/category/)) {
socketData.users.category += rooms[room].length
socketData.users.category += rooms[room].length;
}
}
}
@ -132,7 +132,7 @@ SocketMeta.rooms.getAll = function(socket, data, callback) {
socketData.topics[tid] = {
value: rooms['/topic_' + tid].length,
title: validator.escape(titles[id].title)
}
};
});
callback(null, socketData);

Loading…
Cancel
Save