lint: Fix some straightforward ESLint errors

This commit is contained in:
Richard Hansen 2020-12-08 03:20:59 -05:00
parent ac086c7925
commit ff19181cd1
10 changed files with 154 additions and 153 deletions

View file

@ -1,3 +1,5 @@
'use strict';
const _ = require('underscore');
const cookieParser = require('cookie-parser');
const express = require('express');
@ -5,9 +7,7 @@ const expressSession = require('express-session');
const fs = require('fs');
const hooks = require('../../static/js/pluginfw/hooks');
const log4js = require('log4js');
const npm = require('npm/lib/npm');
const path = require('path');
const sessionStore = require('../db/SessionStore');
const SessionStore = require('../db/SessionStore');
const settings = require('../utils/Settings');
const stats = require('../stats');
const util = require('util');
@ -36,13 +36,16 @@ exports.createServer = async () => {
if (!_.isEmpty(settings.users)) {
console.log(`The plugin admin page is at http://${settings.ip}:${settings.port}/admin/plugins`);
} else {
console.warn("Admin username and password not set in settings.json. To access admin please uncomment and edit 'users' in settings.json");
console.warn('Admin username and password not set in settings.json. ' +
'To access admin please uncomment and edit "users" in settings.json');
}
const env = process.env.NODE_ENV || 'development';
if (env !== 'production') {
console.warn('Etherpad is running in Development mode. This mode is slower for users and less secure than production mode. You should set the NODE_ENV environment variable to production by using: export NODE_ENV=production');
console.warn('Etherpad is running in Development mode. This mode is slower for users and ' +
'less secure than production mode. You should set the NODE_ENV environment ' +
'variable to production by using: export NODE_ENV=production');
}
};
@ -138,7 +141,7 @@ exports.restartServer = async () => {
exports.sessionMiddleware = expressSession({
secret: settings.sessionKey,
store: new sessionStore(),
store: new SessionStore(),
resave: false,
saveUninitialized: true,
// Set the cookie name to a javascript identifier compatible string. Makes code handling it