ESlint no-path-concat

v1.18.x
Peter Jaszkowiak 8 years ago
parent daa169c094
commit 239d7f84dd

@ -47,6 +47,7 @@
"vars-on-top": "off", "vars-on-top": "off",
"no-restricted-syntax": "off", "no-restricted-syntax": "off",
"no-shadow": "off", "no-shadow": "off",
// "no-script-url": "off",
// "linebreak-style": "off", // "linebreak-style": "off",
// "one-var": "off", // "one-var": "off",
@ -90,8 +91,7 @@
"no-extend-native": "off", "no-extend-native": "off",
"no-shadow-restricted-names": "off", "no-shadow-restricted-names": "off",
"no-extra-boolean-cast": "off", "no-extra-boolean-cast": "off",
"no-script-url": "off", // "no-path-concat": "off",
"no-path-concat": "off",
// "no-unused-expressions": "off", // "no-unused-expressions": "off",
// "no-return-assign": "off", // "no-return-assign": "off",
// "no-restricted-modules": "off", // "no-restricted-modules": "off",

@ -11,11 +11,12 @@ var file = require('./src/file');
var pkg = require('./package.json'); var pkg = require('./package.json');
nconf.argv().env().file({ nconf.argv().env().file({
file: path.join(__dirname, '/config.json'), file: path.join(__dirname, 'config.json'),
}); });
var pidFilePath = __dirname + '/pidfile'; var pidFilePath = path.join(__dirname, 'pidfile');
var output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true }); 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 silent = nconf.get('silent') === 'false' ? false : nconf.get('silent') !== false;
var numProcs; var numProcs;
var workers = []; var workers = [];
@ -126,7 +127,7 @@ function forkWorker(index, isPrimary) {
Loader.addWorkerEvents(worker); Loader.addWorkerEvents(worker);
if (silent) { 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.stdout.pipe(output);
worker.stderr.pipe(output); worker.stderr.pipe(output);
} }
@ -181,7 +182,7 @@ Loader.stop = function () {
killWorkers(); killWorkers();
// Clean up the pidfile // Clean up the pidfile
fs.unlinkSync(__dirname + '/pidfile'); fs.unlinkSync(pidFilePath);
}; };
function killWorkers() { function killWorkers() {
@ -222,7 +223,7 @@ fs.open(path.join(__dirname, 'config.json'), 'r', function (err) {
stderr: process.stderr, stderr: process.stderr,
}); });
fs.writeFile(__dirname + '/pidfile', process.pid); fs.writeFile(pidFilePath, process.pid);
} }
async.series([ async.series([

Loading…
Cancel
Save