Skip to content

Commit ddcb29b

Browse files
committed
fix: auto-stage files modified by pre-commit hook
Add `git add -u` after `bun check` in the pre-commit hook so files reformatted by biome are re-staged before the commit completes.
1 parent 285c286 commit ddcb29b

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"type-check": "tsc --noEmit"
3535
},
3636
"simple-git-hooks": {
37-
"pre-commit": "bun check"
37+
"pre-commit": "bun check && git add -u"
3838
},
3939
"devDependencies": {
4040
"@biomejs/biome": "^2.4.2",

src/services/schema.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { loadConfig } from '../config'
21
import type { ValidationConfig } from '../config'
2+
import { loadConfig } from '../config'
33
import { getPreset } from '../presets'
44
import { loadUserAIConfig } from './ai/config'
55

@@ -77,10 +77,7 @@ export async function getProjectSchema(): Promise<ProjectSchema> {
7777
const validation = config.validation || defaultValidation
7878

7979
// Merge scopes from preset + config allowedScopes
80-
const scopes = [
81-
...(preset.scopes || []),
82-
...(validation.allowedScopes || []),
83-
]
80+
const scopes = [...(preset.scopes || []), ...(validation.allowedScopes || [])]
8481
const uniqueScopes = [...new Set(scopes)]
8582

8683
return {

0 commit comments

Comments
 (0)