Node.js based forum software built for the modern web
ESlint no-path-concat
Peter Jaszkowiak239d7f84dda0
diff --git a/.eslintrc b/.eslintrcindex 5adcaa5543..4d7e913688 100644--- a/.eslintrc+++ b/.eslintrc@@ -47,6 +47,7 @@"vars-on-top": "off","no-restricted-syntax": "off","no-shadow": "off",+ // "no-script-url": "off",// "linebreak-style": "off",// "one-var": "off",@@ -90,8 +91,7 @@"no-extend-native": "off","no-shadow-restricted-names": "off","no-extra-boolean-cast": "off",- "no-script-url": "off",- "no-path-concat": "off",+ // "no-path-concat": "off",// "no-unused-expressions": "off",// "no-return-assign": "off",// "no-restricted-modules": "off",diff --git a/loader.js b/loader.jsindex 7cfefbf259..66c2de862a 100644--- a/loader.js+++ b/loader.js@@ -11,11 +11,12 @@ var file = require('./src/file');var pkg = require('./package.json');nconf.argv().env().file({- file: path.join(__dirname, '/config.json'),+ file: path.join(__dirname, 'config.json'),});-var pidFilePath = __dirname + '/pidfile';-var output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true });+var pidFilePath = path.join(__dirname, 'pidfile');+var outputLogFilePath = path.join(__dirname, 'logs/output.log');+var output = logrotate({ file: outputLogFilePath, size: '1m', keep: 3, compress: true });var silent = nconf.get('silent') === 'false' ? false : nconf.get('silent') !== false;var numProcs;var workers = [];@@ -126,7 +127,7 @@ function forkWorker(index, isPrimary) {Loader.addWorkerEvents(worker);if (silent) {- var output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true });+ var output = logrotate({ file: outputLogFilePath, size: '1m', keep: 3, compress: true });worker.stdout.pipe(output);worker.stderr.pipe(output);}@@ -181,7 +182,7 @@ Loader.stop = function () {killWorkers();// Clean up the pidfile- fs.unlinkSync(__dirname + '/pidfile');+ fs.unlinkSync(pidFilePath);};function killWorkers() {@@ -222,7 +223,7 @@ fs.open(path.join(__dirname, 'config.json'), 'r', function (err) {stderr: process.stderr,});- fs.writeFile(__dirname + '/pidfile', process.pid);+ fs.writeFile(pidFilePath, process.pid);}async.series([