Add eslint and prettier support

This commit is contained in:
Joseph Garrone 2020-05-27 22:02:44 +02:00
parent 95d413a2ce
commit 89f37d738b
20 changed files with 1971 additions and 170 deletions

View file

@ -1,4 +1,3 @@
import * as fs from "fs";
import * as path from "path";
@ -6,17 +5,15 @@ function getProjectRootRec(dirPath: string): string {
if (fs.existsSync(path.join(dirPath, "package.json"))) {
return dirPath;
}
return getProjectRootRec(path.join(dirPath, ".."))
return getProjectRootRec(path.join(dirPath, ".."));
}
let result: string | undefined = undefined;
export function getProjectRoot(): string {
if (result !== undefined) {
return result;
}
return result = getProjectRootRec(__dirname);
return (result = getProjectRootRec(__dirname));
}

View file

@ -1,4 +1,3 @@
export function toUpperCase(str: string): string{
export function toUpperCase(str: string): string {
return str.toUpperCase();
}
}