Skip to content

Node.js based forum software built for the modern web

some minor linting elsewhere

psychobunny2a2490541fc3
diff --git a/public/src/widgets.js b/public/src/widgets.js
index 619b1aada0..9e34ba9513 100644
--- a/public/src/widgets.js
+++ b/public/src/widgets.js
@@ -1,5 +1,5 @@
"use strict";
-/*global ajaxify, templates*/
+/*global ajaxify, templates, config, RELATIVE_PATH*/
(function(ajaxify) {
ajaxify.widgets = {};
diff --git a/src/meta.js b/src/meta.js
index 4f85404769..bafaaf3477 100644
--- a/src/meta.js
+++ b/src/meta.js
@@ -53,7 +53,9 @@ var async = require('async'),
emitter.emit('nodebb:ready');
}
- if (callback) callback.apply(null, arguments);
+ if (callback) {
+ callback.apply(null, arguments);
+ }
});
};
diff --git a/src/meta/css.js b/src/meta/css.js
index e11ebb3089..6ca6dd01aa 100644
--- a/src/meta/css.js
+++ b/src/meta/css.js
@@ -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) {
diff --git a/src/meta/js.js b/src/meta/js.js
index 9c640f3e78..925764c639 100644
--- a/src/meta/js.js
+++ b/src/meta/js.js
@@ -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();
});
- };
+ }
};
\ No newline at end of file
diff --git a/src/socket.io/meta.js b/src/socket.io/meta.js
index 0b715be39a..0a9df4e8da 100644
--- a/src/socket.io/meta.js
+++ b/src/socket.io/meta.js
@@ -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);