mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
79ce60c580
Replace eslint and prettier with oxlint and oxfmt for faster linting and formatting across the monorepo. Remove all eslint and prettier configs, dependencies, and related packages. Add .oxlintrc.json and .oxfmtrc.json for the new tooling. Update CI workflows and lefthook hooks accordingly. Reformat codebase with oxfmt. https://claude.ai/code/session_01GMkSf29p78HuMR1mbXn8He
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
output:
|
|
- meta
|
|
- summary
|
|
- success
|
|
- failure
|
|
- execution
|
|
- execution_out
|
|
- execution_info
|
|
- skips
|
|
|
|
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
check-binaries:
|
|
tags: binaries
|
|
run: |
|
|
VIOLATIONS=0
|
|
STAGED=$(git diff --cached --name-only --diff-filter=ACM)
|
|
[ -z "$STAGED" ] && exit 0
|
|
|
|
BINARIES=$(echo "$STAGED" | grep -iE '\.(exe|dll|so|dylib|o|obj|a|lib|wasm)$' || true)
|
|
if [ -n "$BINARIES" ]; then
|
|
echo "Binary files detected:" && echo "$BINARIES"
|
|
VIOLATIONS=1
|
|
fi
|
|
|
|
BUILD=$(echo "$STAGED" | grep -E '/build/' || true)
|
|
if [ -n "$BUILD" ]; then
|
|
echo "Files in build directories:" && echo "$BUILD"
|
|
VIOLATIONS=1
|
|
fi
|
|
|
|
DSYM=$(echo "$STAGED" | grep -E '\.dSYM/' || true)
|
|
if [ -n "$DSYM" ]; then
|
|
echo "dSYM directories:" && echo "$DSYM"
|
|
VIOLATIONS=1
|
|
fi
|
|
|
|
for f in $STAGED; do
|
|
[ ! -f "$f" ] && continue
|
|
case "$f" in pnpm-lock.yaml|*/package-lock.json) continue ;; esac
|
|
SIZE=$(wc -c < "$f" | tr -d ' ')
|
|
if [ "$SIZE" -gt 1048576 ]; then
|
|
echo "Oversized file: $f ($((SIZE / 1024)) KB)"
|
|
VIOLATIONS=1
|
|
fi
|
|
done
|
|
|
|
[ "$VIOLATIONS" -eq 1 ] && exit 1
|
|
exit 0
|
|
sync-lockfile:
|
|
tags: lockfile
|
|
glob: "**/package.json"
|
|
run: pnpm i --lockfile-only
|
|
stage_fixed: true
|
|
lint-fix:
|
|
tags: lint
|
|
run: pnpm run lint && pnpm run format
|
|
stage_fixed: true
|
|
test-and-check-packages:
|
|
tags: test-packages
|
|
env:
|
|
NX_TUI: "false"
|
|
run: pnpm run test && pnpm run check:packages
|
|
|
|
commit-msg:
|
|
commands:
|
|
commitlint:
|
|
tags: commitlint
|
|
run: pnpm commitlint --edit {1}
|