Skip to content

Commit beca21c

Browse files
committed
chore: update lint-on-edit hook and prompts for consistency
Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
1 parent cf00e5d commit beca21c

9 files changed

Lines changed: 22 additions & 21 deletions

File tree

.geminiignore

Whitespace-only changes.

.github/hooks/lint-on-edit.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"version": 1,
32
"hooks": {
4-
"postToolUse": [
3+
"PostToolUse": [
54
{
65
"type": "command",
7-
"bash": ".github/hooks/lint-on-edit.sh",
8-
"timeoutSec": 30
6+
"linux": "bash .github/hooks/lint-on-edit.sh",
7+
"osx": "bash .github/hooks/lint-on-edit.sh",
8+
"timeout": 30
99
}
1010
]
1111
}

.github/hooks/lint-on-edit.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#!/bin/bash
2-
# postToolUse hook: run pnpm lint only after file edit or create tools.
3-
# Copilot passes the tool invocation as JSON on stdin.
1+
#!/usr/bin/env bash
2+
# PostToolUse hook: run pnpm lint only after file mutation tools.
43
set -eo pipefail
54

6-
INPUT=$(cat)
7-
TOOL=$(echo "$INPUT" | jq -r '.toolName' 2>/dev/null)
5+
input=$(cat)
6+
tool_name=$(echo "$input" | jq -r '.tool_name // empty' 2>/dev/null)
87

9-
if [ "$TOOL" = "edit" ] || [ "$TOOL" = "create" ]; then
10-
pnpm lint --quiet 2>&1 | tail -40
11-
fi
8+
case "$tool_name" in
9+
apply_patch | create_file | editFiles | insert_edit_into_file | replace_string_in_file)
10+
pnpm lint 2>&1 | tail -40
11+
;;
12+
esac

.github/prompts/add-doc-section.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Add a new documentation section (page or category) to docs/, community/, or ecosystem/ following project conventions."
3-
mode: agent
3+
agent: agent
44
argument-hint: "Section title, target path, and related docs to link"
55
---
66

.github/prompts/audit-consistency.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Audit and auto-fix consistency, performance, and style issues across TypeScript components, MDX docs, CSS, and imports."
3-
mode: agent
3+
agent: agent
44
argument-hint: "File path, directory glob, or 'all' to scan the full project"
55
---
66

.github/prompts/project-health.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Verify project consistency, find issues, and propose improvements across dependencies, config, build, docs, and tooling. Run monthly, before releases, or after major upgrades."
3-
mode: agent
3+
agent: agent
44
argument-hint: "'full' for all checks, or a category: deps, config, build, docs, tooling"
55
tools:
66
- search

.github/prompts/review-pr.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Review changed files for consistency, performance, and style issues before merging. Scoped to staged and unstaged git changes."
3-
mode: agent
3+
agent: agent
44
argument-hint: "'staged' for pre-commit review, or omit for all changes"
55
tools:
66
- get_changed_files

.github/skills/codebase-health-audit/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ Summarize results:
9191
- Prompt: [audit-consistency](../../prompts/audit-consistency.prompt.md) — single-task version
9292
- Prompt: [review-pr](../../prompts/review-pr.prompt.md) — scoped to changed files
9393
- Skill: [docs-release-readiness](../docs-release-readiness/SKILL.md) — docs-specific QA
94-
- Hook: [lint-on-edit](../../hooks/lint-on-edit.json)automatic lint after edits (fires in both CLI and cloud agent contexts)
94+
- Hook: [lint-on-edit](../../hooks/lint-on-edit.json)workspace hook that runs lint after file-mutation tool calls in VS Code agent sessions

wrangler.jsonc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// wrangler.jsonc — Pages Functions configuration
2-
// Becomes the source of truth once pages_build_output_dir is set
31
{
42
"$schema": "node_modules/wrangler/config-schema.json",
53
"name": "zsh",
6-
"pages_build_output_dir": "build",
7-
"compatibility_date": "2026-04-19",
84
"compatibility_flags": ["nodejs_compat"],
5+
"compatibility_date": "2026-04-28",
6+
"assets": {
7+
"directory": "./build"
8+
},
99
"r2_buckets": [
1010
{
1111
"binding": "ASSETS_BUCKET",

0 commit comments

Comments
 (0)