more lint fixes
This commit is contained in:
parent
3e545cdaa9
commit
67c073e4f2
7 changed files with 29 additions and 15 deletions
|
|
@ -98,11 +98,11 @@ export class ConfigManager<T = Record<string, unknown>> {
|
|||
getValue<R = unknown>(path: string): R {
|
||||
const config = this.get();
|
||||
const keys = path.split('.');
|
||||
let value: any = config;
|
||||
let value: unknown = config;
|
||||
|
||||
for (const key of keys) {
|
||||
if (value && typeof value === 'object' && key in value) {
|
||||
value = value[key];
|
||||
value = (value as Record<string, unknown>)[key];
|
||||
} else {
|
||||
throw new ConfigError(`Configuration key not found: ${path}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ export function getProviderConfig(provider: string) {
|
|||
if (!providers || !(provider in providers)) {
|
||||
throw new Error(`Provider configuration not found: ${provider}`);
|
||||
}
|
||||
return (providers as any)[provider];
|
||||
return (providers as Record<string, unknown>)[provider];
|
||||
}
|
||||
|
||||
// Export environment helpers
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export class FileLoader implements ConfigLoader {
|
|||
try {
|
||||
const content = await readFile(filepath, 'utf-8');
|
||||
return JSON.parse(content);
|
||||
} catch (error: any) {
|
||||
} catch (error: unknown) {
|
||||
// File not found is not an error (configs are optional)
|
||||
if (error.code === 'ENOENT') {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue