@@ -76,9 +76,7 @@ function printHelp(): void {
7676 logger . log ( ' socket-lib check prim [opts] # short alias' )
7777 logger . log ( '' )
7878 logger . log ( 'Options:' )
79- logger . log (
80- ` --config <path> Config file. Default: ${ DEFAULT_CONFIG_PATH } ` ,
81- )
79+ logger . log ( ` --config <path> Config file. Default: ${ DEFAULT_CONFIG_PATH } ` )
8280 logger . log ( ' --explain Print one detailed line per finding.' )
8381 logger . log ( ' --json Machine-readable JSON output.' )
8482 logger . log ( ' --quiet Silent on success.' )
@@ -89,7 +87,9 @@ function printHelp(): void {
8987 logger . log ( ' "primordials": {' )
9088 logger . log ( ' "aliasMap": { "Array": "ArrayCtor" },' )
9189 logger . log ( ' "nodeInternalOnly": ["SafeMap", "SafeSet"],' )
92- logger . log ( ' "scanDirs": ["src", "additions/source-patched/lib"]' )
90+ logger . log (
91+ ' "scanDirs": ["src", "additions/source-patched/lib"]' ,
92+ )
9393 logger . log ( ' }' )
9494 logger . log ( ' }' )
9595 logger . log ( '' )
@@ -118,18 +118,12 @@ function loadConfig(configPath: string): PrimordialsCheckConfig {
118118 // check (primordials, paths, public-surface, ...). When the file
119119 // has the section, use it; otherwise treat the whole file as the
120120 // primordials config (back-compat with single-check setups).
121- if (
122- typeof parsed !== 'object' ||
123- parsed === null ||
124- Array . isArray ( parsed )
125- ) {
121+ if ( typeof parsed !== 'object' || parsed === null || Array . isArray ( parsed ) ) {
126122 throw new Error ( 'config root must be an object' )
127123 }
128124 const root = parsed as Record < string , unknown >
129125 const sectional = root [ CONFIG_SECTION ]
130- const raw = (
131- sectional !== undefined ? sectional : root
132- ) as RawConfig
126+ const raw = ( sectional !== undefined ? sectional : root ) as RawConfig
133127
134128 // Validate shape with concrete error messages — config files are
135129 // hand-edited and a misspelling here is the most common failure
@@ -152,7 +146,10 @@ function loadConfig(configPath: string): PrimordialsCheckConfig {
152146 ) {
153147 throw new Error ( 'config.aliasMap must be an object of source→target' )
154148 }
155- if ( raw . nodeInternalOnly !== undefined && ! Array . isArray ( raw . nodeInternalOnly ) ) {
149+ if (
150+ raw . nodeInternalOnly !== undefined &&
151+ ! Array . isArray ( raw . nodeInternalOnly )
152+ ) {
156153 throw new Error ( 'config.nodeInternalOnly must be an array of strings' )
157154 }
158155
@@ -204,10 +201,7 @@ function serialize(result: PrimordialsCheckResult): {
204201 }
205202}
206203
207- function renderHuman (
208- result : PrimordialsCheckResult ,
209- args : ParsedArgs ,
210- ) : void {
204+ function renderHuman ( result : PrimordialsCheckResult , args : ParsedArgs ) : void {
211205 if ( result . findings . length === 0 ) {
212206 if ( ! args . silent ) {
213207 logger . success (
0 commit comments