File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,13 @@ Decision tree:
366366
367367### Code Style - Patterns
368368- ** Constants** : ` UPPER_SNAKE_CASE `
369- - ** Return values** : ` undefined ` not ` null ` (except external APIs)
369+ - ** Avoid ` null ` ** : Use ` undefined ` instead of ` null ` throughout codebase
370+ - Default parameters: ` function foo(bar = undefined) ` or just ` function foo(bar) `
371+ - Variable initialization: ` let x ` or ` let x = undefined ` , not ` let x = null `
372+ - Return values: Return ` undefined ` not ` null `
373+ - Optional properties: Use ` ?: ` syntax, not ` | null `
374+ - Exception: ` __proto__: null ` for prototype-less objects (required pattern)
375+ - Exception: External APIs that explicitly require ` null `
370376- ** __ proto__ ** : MANDATORY - Always first in literals: ` { __proto__: null, ...opts } `
371377- ** Null-prototype objects** : Use ` Object.create(null) ` for empty objects only; ` { __proto__: null, key: val } ` when properties exist
372378- ** Options pattern** : MANDATORY ` const opts = { __proto__: null, ...options } as SomeOptions `
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ catalog:
2222 ' @npmcli/package-json ' : 7.0.0
2323 ' @npmcli/promise-spawn ' : 8.0.3
2424 ' @socketregistry/packageurl-js ' : 1.3.5
25- ' @socketsecurity/lib ' : 5.2.1
25+ ' @socketsecurity/lib ' : 5.3.0
2626 ' @types/fs-extra ' : 11.0.4
2727 ' @types/node ' : 24.9.2
2828 ' @types/normalize-package-data ' : 2.4.4
You can’t perform that action at this time.
0 commit comments