mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Add eslint and prettier support
This commit is contained in:
parent
95d413a2ce
commit
89f37d738b
20 changed files with 1971 additions and 170 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
export function toUpperCase(str: string): string{
|
||||
export function toUpperCase(str: string): string {
|
||||
return str.toUpperCase();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue