Skip to content

Commit c500adc

Browse files
committed
feat: set up eslint file change hook
1 parent ab7d147 commit c500adc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

codebuff.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
{
5959
"name": "prettier-format",
60-
"command": "git diff --name-only --diff-filter=ACMR | grep -E '\\.(ts|tsx|json|md)$' | xargs -r npx prettier --write",
60+
"command": "set -o pipefail && CHANGED=\"$(git diff --name-only --diff-filter=ACMR | grep -E '\\.(ts|tsx|json|md)$' | xargs -r npx prettier --list-different || true)\"; [ -n \"$CHANGED\" ] && echo \"$CHANGED\" | xargs -r npx prettier --write --log-level=warn && printf '%s\\n' \"$CHANGED\" || true",
6161
"filePattern": "**/*.{ts,tsx,json,md}"
6262
},
6363
{
@@ -70,6 +70,11 @@
7070
"command": "bun run typecheck",
7171
"cwd": ".agents",
7272
"filePattern": ".agents/**/*.ts"
73+
},
74+
{
75+
"name": "eslint-fix-imports",
76+
"command": "set -o pipefail && git diff --name-only --diff-filter=ACMR | grep -E '\\.(ts|tsx|js|jsx)$' | xargs -r npx eslint --fix --quiet",
77+
"filePattern": "**/*.{ts,tsx,js,jsx}"
7378
}
7479
]
7580
}

0 commit comments

Comments
 (0)