Skip to content

Commit 50adf7c

Browse files
committed
Make pre-commit executable; clarify sanitizer note
Make the .husky/pre-commit script executable and add a POSIX shebang so the hook runs reliably. In src/utils/options.ts, add a clarifying comment explaining that sanitizers return null when the input is already bridge-safe (e.g. trimStringFields), and that using `sanitizer(value) !== null` is a valid dirty-check without a separate traversal. No functional logic changes.
1 parent 29dbda9 commit 50adf7c

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.husky/pre-commit

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#!/usr/bin/env sh
12
yarn lint-staged

src/utils/options.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ export const normalizeOptions = (
133133
if (!options) return undefined
134134

135135
// Fast first pass: detect whether anything needs to change.
136+
// Sanitizers return `null` only when the input is already bridge-safe
137+
// (see `trimStringFields`), so `sanitizer(value) !== null` is a sound
138+
// dirty-check predicate without needing a separate traversal.
136139
let dirty = false
137140
const keys = Object.keys(options)
138141

0 commit comments

Comments
 (0)