fix(prettier): Properly handle lint-stage files (#6970)
Now handles top level files and recursive files in folders. Set max line length to be 100
This commit is contained in:
@@ -15,23 +15,15 @@ const help = function () {
|
||||
console.log(' Usage with npm start');
|
||||
console.log('');
|
||||
console.log(' $ npm start -- path/to/config.json');
|
||||
console.log(
|
||||
' $ npm start -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL'
|
||||
);
|
||||
console.log(
|
||||
' $ npm start -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL'
|
||||
);
|
||||
console.log(' $ npm start -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL');
|
||||
console.log(' $ npm start -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL');
|
||||
console.log('');
|
||||
console.log('');
|
||||
console.log(' Usage:');
|
||||
console.log('');
|
||||
console.log(' $ parse-server path/to/config.json');
|
||||
console.log(
|
||||
' $ parse-server -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL'
|
||||
);
|
||||
console.log(
|
||||
' $ parse-server -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL'
|
||||
);
|
||||
console.log(' $ parse-server -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL');
|
||||
console.log(' $ parse-server -- --appId APP_ID --masterKey MASTER_KEY --serverURL serverURL');
|
||||
console.log('');
|
||||
};
|
||||
|
||||
@@ -43,9 +35,7 @@ runner({
|
||||
if (!options.appId || !options.masterKey) {
|
||||
program.outputHelp();
|
||||
console.error('');
|
||||
console.error(
|
||||
'\u001b[31mERROR: appId and masterKey are required\u001b[0m'
|
||||
);
|
||||
console.error('\u001b[31mERROR: appId and masterKey are required\u001b[0m');
|
||||
console.error('');
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -67,19 +57,14 @@ runner({
|
||||
}
|
||||
|
||||
if (options.cluster) {
|
||||
const numCPUs =
|
||||
typeof options.cluster === 'number'
|
||||
? options.cluster
|
||||
: os.cpus().length;
|
||||
const numCPUs = typeof options.cluster === 'number' ? options.cluster : os.cpus().length;
|
||||
if (cluster.isMaster) {
|
||||
logOptions();
|
||||
for (let i = 0; i < numCPUs; i++) {
|
||||
cluster.fork();
|
||||
}
|
||||
cluster.on('exit', (worker, code) => {
|
||||
console.log(
|
||||
`worker ${worker.process.pid} died (${code})... Restarting`
|
||||
);
|
||||
console.log(`worker ${worker.process.pid} died (${code})... Restarting`);
|
||||
cluster.fork();
|
||||
});
|
||||
} else {
|
||||
@@ -96,9 +81,7 @@ runner({
|
||||
}
|
||||
|
||||
function printSuccessMessage() {
|
||||
console.log(
|
||||
'[' + process.pid + '] parse-server running on ' + options.serverURL
|
||||
);
|
||||
console.log('[' + process.pid + '] parse-server running on ' + options.serverURL);
|
||||
if (options.mountGraphQL) {
|
||||
console.log(
|
||||
'[' +
|
||||
|
||||
Reference in New Issue
Block a user