Skip to content

Commit 84c0fd4

Browse files
fix: resolve linting errors and ensure workflows wait for tests (#18)
- Fix biome formatting issues in src/commands/init.ts and templates/hooks/index.ts - Update release.yml and onPushToMain.yml to depend on test-and-lint job - Ensures releases only happen after all tests and linting pass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent 06860b0 commit 84c0fd4

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

.github/workflows/onPushToMain.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ permissions:
99
contents: write
1010

1111
jobs:
12+
test-and-lint:
13+
uses: ./.github/workflows/test.yml
14+
1215
release:
16+
needs: test-and-lint
1317
runs-on: ubuntu-latest
1418
steps:
1519
- uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ on:
66
- main
77

88
jobs:
9+
test-and-lint:
10+
uses: ./.github/workflows/test.yml
11+
912
release:
13+
needs: test-and-lint
1014
runs-on: ubuntu-latest
1115
permissions:
1216
contents: write

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commands/init.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ This command sets up basic Claude Code hooks in your project:
4545
const {spawn} = await import('node:child_process')
4646
const isWindows = process.platform === 'win32'
4747
const command = isWindows ? 'where' : 'which'
48-
4948
const checkBun = await new Promise<boolean>((resolve) => {
5049
const child = spawn(command, ['bun'], {shell: false})
5150
child.on('error', () => resolve(false))

templates/hooks/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ async function preToolUse(payload: PreToolUsePayload): Promise<HookResponse> {
2727
const bashInput = payload.tool_input as BashToolInput
2828
const command = bashInput.command
2929
console.log(`🚀 Running command: ${command}`)
30-
30+
3131
// Block dangerous commands
3232
if (command.includes('rm -rf /') || command.includes('rm -rf ~')) {
3333
console.error('❌ Dangerous command detected! Blocking execution.')
34-
return { action: 'reject', message: 'Dangerous command detected' }
34+
return {action: 'reject', message: 'Dangerous command detected'}
3535
}
3636
}
3737

0 commit comments

Comments
 (0)