mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
ESlint spaced-comment
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"use strict";
|
||||
/*global config, componentHandler, socket, app, bootbox, Slideout, NProgress, utils*/
|
||||
|
||||
(function () {
|
||||
var logoutTimer = 0;
|
||||
|
||||
@@ -29,7 +29,7 @@ define('admin/extend/plugins', ['jqueryui', 'translator'], function (jqueryui, t
|
||||
btn.html(buttonText);
|
||||
btn.toggleClass('btn-warning', status.active).toggleClass('btn-success', !status.active);
|
||||
|
||||
//clone it to active plugins tab
|
||||
// clone it to active plugins tab
|
||||
if (status.active && !$('#active #' + pluginID).length) {
|
||||
$('#active ul').prepend(pluginEl.clone(true));
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seri
|
||||
function 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 = {};
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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-search
|
||||
walk: 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-api
|
||||
var 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 jQuery
|
||||
if (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() */
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
@@ -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 one
|
||||
|
||||
@@ -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 res
|
||||
plugins.fireHook('filter:admin.categories.get', {categories: categories}, next);
|
||||
},
|
||||
function (result, next) {
|
||||
|
||||
@@ -142,7 +142,7 @@ helpers.registerUser = function (data, callback) {
|
||||
});
|
||||
};
|
||||
|
||||
//http://stackoverflow.com/a/14387791/583363
|
||||
// http://stackoverflow.com/a/14387791/583363
|
||||
helpers.copyFile = function (source, target, callback) {
|
||||
|
||||
var cbCalled = false;
|
||||
|
||||
Reference in New Issue
Block a user