Skip to content

Commit 07e9923

Browse files
committed
lint fixes
1 parent 6f030c0 commit 07e9923

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/common/src/logger.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ export const consoleLogger: SkLogger = {
4141
*/
4242
export function createFileLogger(filePath: string): SkLogger {
4343
// Lazy import fs to avoid bundling issues
44-
let fs: any = null;
44+
45+
type FsModule = typeof import('fs');
46+
let fs: FsModule | null = null;
4547

4648
const writeLog = (level: string, message: string, ...args: unknown[]) => {
4749
if (!fs) {
4850
try {
49-
fs = require('fs');
50-
} catch (e) {
51+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
52+
fs = require('fs') as FsModule;
53+
} catch {
5154
// File logging not available in this context
5255
return;
5356
}
@@ -59,7 +62,7 @@ export function createFileLogger(filePath: string): SkLogger {
5962

6063
try {
6164
fs.appendFileSync(filePath, logLine, 'utf8');
62-
} catch (e) {
65+
} catch {
6366
// Silently fail if we can't write to the file
6467
}
6568
};

0 commit comments

Comments
 (0)