Skip to content

Commit a4a56be

Browse files
committed
Fix lint errors: generic constructor and no-catch-all
1 parent cafaee1 commit a4a56be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/app/src/cli/services/build/extension.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const CLEANUP_SIGNALS: NodeJS.Signals[] = ['SIGINT', 'SIGTERM', 'SIGHUP']
138138
* Returns a cleanup function to remove the handlers when the lock is released normally.
139139
*/
140140
function registerLockCleanupHandlers(releaseLock: () => Promise<void>): () => void {
141-
const handlers: Map<NodeJS.Signals, NodeJS.SignalsListener> = new Map()
141+
const handlers = new Map<NodeJS.Signals, NodeJS.SignalsListener>()
142142

143143
for (const signal of CLEANUP_SIGNALS) {
144144
const handler: NodeJS.SignalsListener = () => {
@@ -180,11 +180,13 @@ async function cleanupStaleLock(lockfilePath: string): Promise<void> {
180180
outputDebug(`Removing stale build lock: ${lockfilePath}`)
181181
await rmdir(lockfilePath, {force: true})
182182
}
183+
// eslint-disable-next-line no-catch-all/no-catch-all
183184
} catch (error) {
184-
// If check fails, try to remove the lock anyway - it's likely corrupted
185+
// If check fails (e.g., ENOENT, corrupted lock), try to remove the lock anyway
185186
outputDebug(`Failed to check lock status, attempting cleanup: ${lockfilePath}`)
186187
try {
187188
await rmdir(lockfilePath, {force: true})
189+
// eslint-disable-next-line no-catch-all/no-catch-all
188190
} catch {
189191
// Ignore cleanup errors - the lock acquisition will fail with a clear message if needed
190192
}

0 commit comments

Comments
 (0)