diff --git a/packages/cli-kit/src/public/node/fs.ts b/packages/cli-kit/src/public/node/fs.ts index 698edd4499..6cd76d6115 100644 --- a/packages/cli-kit/src/public/node/fs.ts +++ b/packages/cli-kit/src/public/node/fs.ts @@ -369,7 +369,7 @@ export function isDirectorySync(path: string): boolean { * @returns The size of the file in bytes. */ export async function fileSize(path: string): Promise { - outputDebug(outputContent`Getting the size of file file at ${outputToken.path(path)}...`) + outputDebug(outputContent`Getting the size of file at ${outputToken.path(path)}...`) return (await fsStat(path)).size } @@ -380,7 +380,7 @@ export async function fileSize(path: string): Promise { * @returns The size of the file in bytes. */ export function fileSizeSync(path: string): number { - outputDebug(outputContent`Sync-getting the size of file file at ${outputToken.path(path)}...`) + outputDebug(outputContent`Sync-getting the size of file at ${outputToken.path(path)}...`) return fsStatSync(path).size } diff --git a/packages/cli-kit/src/public/node/path.ts b/packages/cli-kit/src/public/node/path.ts index 697dad3ed9..f372178011 100644 --- a/packages/cli-kit/src/public/node/path.ts +++ b/packages/cli-kit/src/public/node/path.ts @@ -135,8 +135,6 @@ export function commonParentDirectory(first: string, second: string): string { export function relativizePath(path: string, dir: string = cwd()): string { const result = commonParentDirectory(path, dir) const relativePath = relative(dir, path) - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore const relativeComponents = relativePath.split('/').filter((component) => component === '..').length if (result === '/' || relativePath === '' || relativeComponents > 2) { return path