Skip to content

Commit 5cfcfda

Browse files
committed
fix(scripts): hoist logger to module scope in lint.mjs
Fixes ReferenceError where logger was undefined in main().catch() handler. Logger was previously imported but not instantiated at module scope.
1 parent 361e03a commit 5cfcfda

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/cli/scripts/lint.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { getDefaultLogger } from '@socketsecurity/lib/logger'
1414
import { spawn } from '@socketsecurity/lib/spawn'
1515
import { printHeader } from '@socketsecurity/lib/stdio/header'
1616

17+
const logger = getDefaultLogger()
18+
1719
// Files that trigger a full lint when changed
1820
const CORE_FILES = new Set([
1921
'src/constants.ts',

0 commit comments

Comments
 (0)