mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-15 16:41:11 -07:00
Disallow unsafe type assertions (#18688)
This commit is contained in:
committed by
GitHub
parent
bce1caefd0
commit
fd65416a2f
@@ -273,6 +273,7 @@ function parseRetentionPeriod(period: string): number {
|
||||
);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
return value * MULTIPLIERS[unit as keyof typeof MULTIPLIERS];
|
||||
}
|
||||
|
||||
@@ -293,6 +294,7 @@ function validateRetentionConfig(
|
||||
try {
|
||||
maxAgeMs = parseRetentionPeriod(retentionConfig.maxAge);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
return (error as Error | string).toString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user