mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 15:42:52 +01:00
some minor linting elsewhere
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user