Skip to content

Commit d4cfa79

Browse files
committed
chore(scripts/pre-commit): fix type checking warnings
1 parent bd50ff9 commit d4cfa79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scripts/pre-commit.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const lintStagedResult = spawn.sync(
8181
{stdio: 'inherit'},
8282
)
8383

84-
if (useCustomBuiltInConfig) {
84+
if (useCustomBuiltInConfig && customBuiltInConfig) {
8585
fs.rmdirSync(path.dirname(customBuiltInConfig), {recursive: true})
8686
}
8787

@@ -90,7 +90,7 @@ if (lintStagedResult.status === 0 && ifScript('validate')) {
9090
stdio: 'inherit',
9191
})
9292

93-
process.exit(validateResult.status)
93+
process.exit(validateResult.status ?? 0)
9494
} else {
95-
process.exit(lintStagedResult.status)
95+
process.exit(lintStagedResult.status ?? 0)
9696
}

0 commit comments

Comments
 (0)