chore: lint & prettier

This commit is contained in:
Erica Marigold 2022-11-22 19:13:53 +05:30
parent e459089280
commit c49e2244d1
No known key found for this signature in database
GPG key ID: 23CD97ABBBCC5ED2
4 changed files with 100 additions and 101 deletions

View file

@ -4,7 +4,7 @@ module.exports = {
extends: ["custom"], extends: ["custom"],
settings: { settings: {
next: { next: {
rootDir: ["apps/*/"], rootDir: ["packages/*/"],
}, },
}, },
}; };

View file

@ -78,7 +78,7 @@ export default function main(shouldInstall: boolean) {
answers.location answers.location
); );
} else if (!shouldInstall) { } else if (!shouldInstall) {
logger.custom(packageManager, "Skipping installation step.") logger.custom(packageManager, "Skipping installation step.");
} }
}); });
} }
@ -94,7 +94,7 @@ export default function main(shouldInstall: boolean) {
answers.location answers.location
); );
} else if (!shouldInstall) { } else if (!shouldInstall) {
logger.custom(packageManager, "Skipping installation step.") logger.custom(packageManager, "Skipping installation step.");
} }
}); });
} }

View file

@ -3,8 +3,7 @@
import getConstant from "../utils/constants"; import getConstant from "../utils/constants";
import interactiveClient from "../lib/interactiveClient"; import interactiveClient from "../lib/interactiveClient";
import * as logger from "../utils/logger"; import * as logger from "../utils/logger";
import * as globals from "../utils/globals" import * as globals from "../utils/globals";
const args = process.argv.filter((_, i: number) => { const args = process.argv.filter((_, i: number) => {
return i > 1; return i > 1;
@ -12,7 +11,6 @@ const args = process.argv.filter((_, i: number) => {
const weclomeASCII = getConstant("welcomeMessage"); const weclomeASCII = getConstant("welcomeMessage");
const helpMenu = getConstant("helpMenu"); const helpMenu = getConstant("helpMenu");
if (args.length > 0) { if (args.length > 0) {
switch (args[0]) { switch (args[0]) {
case "-h": case "-h":
@ -27,8 +25,8 @@ if (args.length > 0) {
break; break;
case "--no-install": case "--no-install":
case "-n": case "-n":
globals.setGlobal("shouldInstall", false) globals.setGlobal("shouldInstall", false);
interactiveClient(false) interactiveClient(false);
break; break;
default: default:
console.log(weclomeASCII); console.log(weclomeASCII);

View file

@ -1,13 +1,14 @@
export let globalsStore = { meta: { created: new Date().getDate() + new Date().getTime() } } export let globalsStore = {
meta: { created: new Date().getDate() + new Date().getTime() },
};
export function setGlobal(global: string, value: any): void { export function setGlobal(global: string, value: any): void {
globalsStore[global] = value globalsStore[global] = value;
} }
export function getGlobal(global: string): any { export function getGlobal(global: string): any {
return globalsStore[global] return globalsStore[global];
} }
export function getGlobals(): {} { export function getGlobals(): {} {
return globalsStore return globalsStore;
} }