chore: eslint import/newline-after-import

v1.18.x
Peter Jaszkowiak 4 years ago committed by Julian Lam
parent 9f6a682ca9
commit 4ee0f1459d

@ -114,7 +114,6 @@
"prefer-template": "off",
"no-var": "off",
"vars-on-top": "off",
"import/newline-after-import": "off",
// TODO
"consistent-return": "off",

@ -2,11 +2,13 @@
const path = require('path');
const nconf = require('nconf');
nconf.argv().env({
separator: '__',
});
const winston = require('winston');
const fork = require('child_process').fork;
const env = process.env;
var worker;
@ -14,6 +16,7 @@ env.NODE_ENV = env.NODE_ENV || 'development';
const configFile = path.resolve(__dirname, nconf.any(['config', 'CONFIG']) || 'config.json');
const prestart = require('./src/prestart');
prestart.loadConfig(configFile);
var db = require('./src/database');

@ -22,6 +22,7 @@
require('./require-main');
const nconf = require('nconf');
nconf.argv().env({
separator: '__',
});
@ -40,6 +41,7 @@ const configFile = path.resolve(__dirname, nconf.any(['config', 'CONFIG']) || 'c
const configExists = file.existsSync(configFile) || (nconf.get('url') && nconf.get('secret') && nconf.get('database'));
const prestart = require('./src/prestart');
prestart.loadConfig(configFile);
prestart.setupWinston();
prestart.versionCheck();

@ -8,6 +8,7 @@ const path = require('path');
const childProcess = require('child_process');
const less = require('less');
const util = require('util');
const lessRenderAsync = util.promisify(
(style, opts, cb) => less.render(String(style), opts, cb)
);

@ -7,6 +7,7 @@ const meta = require('../meta');
const privileges = require('../privileges');
const apiHelpers = require('./helpers');
const doTopicAction = apiHelpers.doTopicAction;
const websockets = require('../socket.io');

@ -10,6 +10,7 @@ const path = require('path');
const nconf = require('nconf');
const { paths, pluginNamePattern } = require('../constants');
const packageManager = nconf.get('package_manager');
const supportedPackageManagerList = require('./package-install').supportedPackageManager; // load config from src/cli/package-install.js

@ -10,6 +10,7 @@ const social = require('../../social');
const helpers = require('../helpers');
const translator = require('../../../public/src/modules/translator');
const settingsController = module.exports;
settingsController.get = async function (req, res) {

@ -1,6 +1,7 @@
'use strict';
var nconf = require('nconf');
var databaseName = nconf.get('database');
var winston = require('winston');

@ -9,6 +9,7 @@ const mkdirp = require('mkdirp');
const cacheBuster = require('./cacheBuster');
const { aliases } = require('./aliases');
let meta;
const targetHandlers = {

@ -6,6 +6,7 @@ const fs = require('fs');
const util = require('util');
const path = require('path');
const rimraf = require('rimraf');
const rimrafAsync = util.promisify(rimraf);
const plugins = require('../plugins');

@ -10,6 +10,7 @@ if (!mkdirp.hasOwnProperty('native')) {
}
const rimraf = require('rimraf');
const rimrafAsync = util.promisify(rimraf);
const file = require('../file');

@ -6,8 +6,10 @@ const path = require('path');
const fs = require('fs');
const util = require('util');
let mkdirp = require('mkdirp');
mkdirp = mkdirp.hasOwnProperty('native') ? mkdirp : util.promisify(mkdirp);
const rimraf = require('rimraf');
const rimrafAsync = util.promisify(rimraf);
const file = require('../file');

@ -2,6 +2,7 @@
const path = require('path');
const fs = require('fs');
const Logs = module.exports;
Logs.path = path.resolve(__dirname, '../../logs/output.log');

@ -2,6 +2,7 @@
const util = require('util');
let mkdirp = require('mkdirp');
mkdirp = mkdirp.hasOwnProperty('native') ? mkdirp : util.promisify(mkdirp);
const rimraf = require('rimraf');
const winston = require('winston');

@ -14,7 +14,8 @@ const meta = require('../meta');
const pubsub = require('../pubsub');
const { paths } = require('../constants');
const supportedPackageManagerList = require('../cli/package-install').supportedPackageManager; // load config from src/cli/package-install.js
const supportedPackageManagerList = require('../cli/package-install').supportedPackageManager;
// load config from src/cli/package-install.js
const packageManager = supportedPackageManagerList.indexOf(nconf.get('package_manager')) >= 0 ? nconf.get('package_manager') : 'npm';
let packageManagerExecutable = packageManager;
const packageManagerCommands = {

@ -4,6 +4,7 @@ const winston = require('winston');
const nconf = require('nconf');
var helpers = require('./helpers');
var setupPageRoute = helpers.setupPageRoute;
module.exports = function (app, middleware, controllers) {

@ -2,6 +2,7 @@
const async = require('async');
const analytics = require('../../analytics');
const Analytics = module.exports;
Analytics.get = function (socket, data, callback) {

@ -1,6 +1,7 @@
'use strict';
const meta = require('../../meta');
const Errors = module.exports;
Errors.clear = function (socket, data, callback) {

@ -1,6 +1,7 @@
'use strict';
const meta = require('../../meta');
const Logs = module.exports;
Logs.get = function (socket, data, callback) {

@ -1,6 +1,7 @@
'use strict';
const navigationAdmin = require('../../navigation/admin');
const SocketNavigation = module.exports;
SocketNavigation.save = async function (socket, data) {

@ -1,6 +1,7 @@
'use strict';
const rewardsAdmin = require('../../rewards/admin');
const SocketRewards = module.exports;
SocketRewards.save = async function (socket, data) {

@ -2,6 +2,7 @@
const meta = require('../../meta');
const events = require('../../events');
const Settings = module.exports;
Settings.get = function (socket, data, callback) {

@ -1,6 +1,7 @@
'use strict';
const social = require('../../social');
const SocketSocial = module.exports;
SocketSocial.savePostSharingNetworks = async function (socket, data) {

@ -2,6 +2,7 @@
const async = require('async');
const widgets = require('../../widgets');
const Widgets = module.exports;
Widgets.set = function (socket, data, callback) {

@ -2,6 +2,7 @@
const user = require('../user');
const notifications = require('../notifications');
const SocketNotifs = module.exports;
SocketNotifs.get = async function (socket, data) {

@ -13,6 +13,7 @@ const utils = require('../utils');
const api = require('../api');
const sockets = require('.');
const SocketPosts = module.exports;
require('./posts/edit')(SocketPosts);

@ -2,6 +2,7 @@
const util = require('util');
const winston = require('winston');
const sleep = util.promisify(setTimeout);
const api = require('../api');

@ -7,6 +7,7 @@ const user = require('../../user');
const groups = require('../../groups');
const meta = require('../../meta');
const privileges = require('../../privileges');
const now = Date.now();
module.exports = {
name: 'Create verified/unverified user groups',

@ -1,6 +1,7 @@
'use strict';
const nconf = require('nconf');
nconf.argv().env({
separator: '__',
});
@ -14,6 +15,7 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production';
// Alternate configuration file support
const configFile = path.resolve(__dirname, '../../../', nconf.any(['config', 'CONFIG']) || 'config.json');
const prestart = require('../../prestart');
prestart.loadConfig(configFile);
prestart.setupWinston();

@ -1,6 +1,7 @@
'use strict';
const nconf = require('nconf');
nconf.argv().env({
separator: '__',
});
@ -14,6 +15,7 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production';
// Alternate configuration file support
const configFile = path.resolve(__dirname, '../../../', nconf.any(['config', 'CONFIG']) || 'config.json');
const prestart = require('../../prestart');
prestart.loadConfig(configFile);
prestart.setupWinston();

@ -1,6 +1,7 @@
'use strict';
const nconf = require('nconf');
nconf.argv().env({
separator: '__',
});
@ -15,6 +16,7 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production';
// Alternate configuration file support
const configFile = path.resolve(__dirname, '../../../', nconf.any(['config', 'CONFIG']) || 'config.json');
const prestart = require('../../prestart');
prestart.loadConfig(configFile);
prestart.setupWinston();

@ -7,6 +7,7 @@ var path = require('path');
var os = require('os');
var nconf = require('nconf');
var express = require('express');
var app = express();
app.renderAsync = util.promisify((tpl, data, callback) => app.render(tpl, data, callback));
var server;

@ -9,6 +9,7 @@ const request = require('request-promise-native');
const nconf = require('nconf');
const jwt = require('jsonwebtoken');
const util = require('util');
const wait = util.promisify(setTimeout);
const db = require('./mocks/databasemock');

@ -3,6 +3,7 @@
const assert = require('assert');
const async = require('async');
const util = require('util');
const sleep = util.promisify(setTimeout);
const db = require('./mocks/databasemock');

@ -116,6 +116,7 @@ winston.info('database config %s', dbType, testDbConfig);
winston.info('environment ' + global.env);
const db = require('../../src/database');
module.exports = db;
before(async function () {

@ -6,11 +6,13 @@
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const util = require('util');
const sleep = util.promisify(setTimeout);
var assert = require('assert');
var async = require('async');
var nconf = require('nconf');
var request = require('request');
var cookies = request.jar();
var db = require('./mocks/databasemock');

@ -3,6 +3,7 @@
var assert = require('assert');
var shim = require('../public/src/modules/translator.js');
var Translator = shim.Translator;
var db = require('./mocks/databasemock');

Loading…
Cancel
Save