Node.js based forum software built for the modern web
ESlint spaced-comment
Peter Jaszkowiak34e233fe1dae
diff --git a/.eslintrc b/.eslintrcindex 296ff1e04f..5d0b9f37dc 100644--- a/.eslintrc+++ b/.eslintrc@@ -13,10 +13,13 @@"import/no-unresolved": "off","import/no-extraneous-dependencies": "off","import/no-dynamic-require": "off",+ "import/newline-after-import": "off","no-bitwise": "off","newline-per-chained-call": "off","no-console": "off","no-empty": ["error", { "allowEmptyCatch": true }],+ "prefer-rest-params": "off",+ "prefer-spread": "off",// "linebreak-style": "off",// "one-var": "off",@@ -94,12 +97,9 @@"global-require": "off","no-trailing-spaces": "off","key-spacing": "off",- "import/newline-after-import": "off","no-underscore-dangle": "off",- "prefer-spread": "off",// "no-multiple-empty-lines": "off",- "spaced-comment": "off",- "prefer-rest-params": "off",+ // "spaced-comment": "off",// "space-in-parens": "off",// "block-spacing": "off",// "quote-props": "off",diff --git a/minifier.js b/minifier.jsindex dd367b58a7..8504312d22 100644--- a/minifier.js+++ b/minifier.js@@ -35,7 +35,7 @@ Minifier.js.minify = function (scripts, minify, callback) {process.on('message', function (payload) {switch(payload.action) {case 'js':- Minifier.js.minify(payload.scripts, payload.minify, function (minified/*, sourceMap*/) {+ Minifier.js.minify(payload.scripts, payload.minify, function (minified/* , sourceMap*/) {process.send({type: 'end',// sourceMap: sourceMap,@@ -55,7 +55,7 @@ function minifyScripts(scripts, callback) {compress: false,});- callback(minified.code/*, minified.map*/);+ callback(minified.code/* , minified.map*/);} catch(err) {process.send({type: 'error',diff --git a/public/src/admin/admin.js b/public/src/admin/admin.jsindex 8d1d56ab64..6b71868258 100644--- a/public/src/admin/admin.js+++ b/public/src/admin/admin.js@@ -1,5 +1,4 @@"use strict";-/*global config, componentHandler, socket, app, bootbox, Slideout, NProgress, utils*/(function () {var logoutTimer = 0;diff --git a/public/src/admin/extend/plugins.js b/public/src/admin/extend/plugins.jsindex ed99847dd3..df43edf5f7 100644--- a/public/src/admin/extend/plugins.js+++ b/public/src/admin/extend/plugins.js@@ -29,7 +29,7 @@ define('admin/extend/plugins', ['jqueryui', 'translator'], function (jqueryui, tbtn.html(buttonText);btn.toggleClass('btn-warning', status.active).toggleClass('btn-success', !status.active);- //clone it to active plugins tab+ // clone it to active plugins tabif (status.active && !$('#active #' + pluginID).length) {$('#active ul').prepend(pluginEl.clone(true));}diff --git a/public/src/admin/manage/categories.js b/public/src/admin/manage/categories.jsindex e953af0fba..c19a316060 100644--- a/public/src/admin/manage/categories.js+++ b/public/src/admin/manage/categories.js@@ -127,7 +127,7 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-serifunction itemDragDidEnd(e) {var isCategoryUpdate = (newCategoryId != -1);- //Update needed?+ // Update needed?if((e.newIndex != undefined && e.oldIndex != e.newIndex) || isCategoryUpdate) {var parentCategory = isCategoryUpdate ? sortables[newCategoryId] : sortables[e.from.dataset.cid];var modified = {};diff --git a/public/src/overrides.js b/public/src/overrides.jsindex 78b6e3b1db..5ffbdde3b0 100644--- a/public/src/overrides.js+++ b/public/src/overrides.js@@ -40,7 +40,7 @@ if ('undefined' !== typeof window) {});};- //http://stackoverflow.com/questions/511088/use-javascript-to-place-cursor-at-end-of-text-in-text-input-element+ // http://stackoverflow.com/questions/511088/use-javascript-to-place-cursor-at-end-of-text-in-text-input-element$.fn.putCursorAtEnd = function () {return this.each(function () {$(this).focus();diff --git a/public/src/utils.js b/public/src/utils.jsindex 9016b8da65..eb9fec1e27 100644--- a/public/src/utils.js+++ b/public/src/utils.js@@ -32,7 +32,7 @@});},- //Adapted from http://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search+ // Adapted from http://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-searchwalk: function (dir, done) {var results = [];@@ -85,7 +85,7 @@isLatin: /^[\w\d\s.,\-@]+$/,languageKeyRegex: /\[\[[\w]+:.+\]\]/,- //http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/+ // http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/slugify: function (str, preserveCase) {if (!str) {return '';@@ -272,7 +272,7 @@},findBootstrapEnvironment: function () {- //http://stackoverflow.com/questions/14441456/how-to-detect-which-device-view-youre-on-using-twitter-bootstrap-api+ // http://stackoverflow.com/questions/14441456/how-to-detect-which-device-view-youre-on-using-twitter-bootstrap-apivar envs = ['xs', 'sm', 'md', 'lg'];var $el = $('<div>');@@ -324,7 +324,7 @@/* Retrieved from http://stackoverflow.com/a/7557433 @ 27 Mar 2016 */isElementInViewport: function (el) {- //special bonus for those using jQuery+ // special bonus for those using jQueryif (typeof jQuery === "function" && el instanceof jQuery) {el = el[0];}@@ -334,8 +334,8 @@return (rect.top >= 0 &&rect.left >= 0 &&- rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */- rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */+ rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /* or $(window).height() */+ rect.right <= (window.innerWidth || document.documentElement.clientWidth) /* or $(window).width() */);},diff --git a/src/meta/js.js b/src/meta/js.jsindex a9adbead9e..4aaff6f7a9 100644--- a/src/meta/js.js+++ b/src/meta/js.js@@ -231,7 +231,7 @@ module.exports = function (Meta) {* use the line below if you want to debug minifier.js script too (or even --debug-brk option, but* you'll have to setup your debugger and connect to the forked process)*/- //forkProcessParams = {execArgv: ['--debug=' + (global.process.debugPort + 1), '--nolazy']};+ // forkProcessParams = {execArgv: ['--debug=' + (global.process.debugPort + 1), '--nolazy']};/*** otherwise, just clean up --debug/--debug-brk options which are set up by default from the parent onediff --git a/src/socket.io/admin/categories.js b/src/socket.io/admin/categories.jsindex 468564297c..43287fc2b8 100644--- a/src/socket.io/admin/categories.js+++ b/src/socket.io/admin/categories.js@@ -22,7 +22,7 @@ Categories.getAll = function (socket, data, callback) {async.apply(db.getSortedSetRange, 'categories:cid', 0, -1),async.apply(categories.getCategoriesData),function (categories, next) {- //Hook changes, there is no req, and res+ // Hook changes, there is no req, and resplugins.fireHook('filter:admin.categories.get', {categories: categories}, next);},function (result, next) {diff --git a/test/helpers/index.js b/test/helpers/index.jsindex 91582cae11..cfc1f20074 100644--- a/test/helpers/index.js+++ b/test/helpers/index.js@@ -142,7 +142,7 @@ helpers.registerUser = function (data, callback) {});};-//http://stackoverflow.com/a/14387791/583363+// http://stackoverflow.com/a/14387791/583363helpers.copyFile = function (source, target, callback) {var cbCalled = false;