Skip to content

Commit 474c92f

Browse files
committed
fix: lints
1 parent 2483a93 commit 474c92f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

app-config-core/src/config-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export async function parseRawString(contents: string, fileType: FileType): Prom
207207
case FileType.TOML:
208208
return parseTOML(contents) as JsonObject;
209209
case FileType.JSON5:
210-
return parseJSON5(contents) as JsonObject;
210+
return parseJSON5(contents);
211211
default:
212212
throw new BadFileType(`Unsupported FileType '${fileType as string}'`);
213213
}

app-config-exec/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ParsingExtension, parseRawString, guessFileType, AppConfigError } from
33
import { forKey, validateOptions } from '@app-config/extension-utils';
44
import { resolveFilepath } from '@app-config/node';
55
import { exec } from 'child_process';
6-
import { dirname } from 'path';
76
import { promisify } from 'util';
87

98
const execAsync = promisify(exec);

app-config-extensions/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { join, dirname, resolve, isAbsolute } from 'path';
21
import isEqual from 'lodash.isequal';
32
import {
43
forKey,

app-config-git/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ async function gitStatus(): Promise<GitStatus> {
6767
tag: (tag.trim() || undefined)?.split(' ')[0],
6868
};
6969
} catch (error) {
70-
throw new GitError(error.message);
70+
if (error instanceof Error) {
71+
throw new GitError(error.message);
72+
}
73+
74+
throw new GitError('Unknown error');
7175
}
7276
}

0 commit comments

Comments
 (0)