Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm lint-staged
pnpm dlx oxlint@1.9.0 --deny-warnings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Fascinating transition to oxlint - let's verify this rocket won't explode on launch.

This is quite the paradigm shift from lint-staged to oxlint. While I appreciate the move toward stricter linting with --deny-warnings - because warnings are just errors in denial - we need to ensure this doesn't turn every commit into a Mars mission timeline.

Key concerns:

  • oxlint likely processes the entire codebase vs lint-staged's surgical approach on staged files
  • Performance impact could be significant for large codebases
  • Version pinning to 1.9.0 is smart for reproducibility, but the package.json mentions @latest

Let's run some diagnostics to ensure this pre-commit hook doesn't become a bottleneck:


🏁 Script executed:

#!/bin/bash
# Description: Verify oxlint installation, performance characteristics, and alignment with project structure

# Check if oxlint@1.9.0 exists and get basic info
echo "=== Checking oxlint availability ==="
pnpm info oxlint@1.9.0

# Look for any existing oxlint configuration
echo "=== Searching for oxlint config files ==="
fd -t f "oxlint" --exec echo "Found: {}"
fd -t f ".oxlintrc" --exec echo "Found: {}"

# Check package.json for the mentioned precommit script
echo "=== Checking package.json scripts ==="
cat package.json | jq '.scripts | to_entries[] | select(.key | contains("commit") or contains("lint"))'

# Estimate potential performance by checking codebase size
echo "=== Codebase analysis ==="
echo "Total files that might be linted:"
fd -e js -e jsx -e ts -e tsx | wc -l

Length of output: 1601


Oxlint Pre-commit Hook: Performance & Consistency Check

We’ve verified that oxlint@1.9.0 is available (and is indeed the current “latest”), but the package.json script uses @latest while your Husky hook pins to 1.9.0. There’s also no .oxlintrc in the repo, so oxlint will run with defaults, and it will scan ~339 JS/TS files on every commit. Let’s tighten this up:

• Align versioning
– Update .husky/pre-commit to pnpm dlx oxlint@latest --deny-warnings or pin both scripts to 1.9.0 for full reproducibility.
• Add an oxlint config file
– Create a .oxlintrc (or equivalent) to ensure consistent rules across CI and local runs.
• Plan for scale
– 339 files is fine now, but as the repo grows you may want to revisit staged-only linting or incremental runs to keep commits lightning fast.

Let’s land this rocket without turning commits into interplanetary voyages.

🤖 Prompt for AI Agents
In the .husky/pre-commit file at line 1, the oxlint version is pinned to 1.9.0
while package.json uses @latest, causing inconsistency. Update the command to
use pnpm dlx oxlint@latest --deny-warnings to align versions. Additionally,
create a .oxlintrc configuration file in the repo root to define consistent
linting rules. Consider implementing staged-only linting or incremental lint
runs in the future to improve performance as the repo grows.

7 changes: 7 additions & 0 deletions AGENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,10 @@ This is a pnpm workspace monorepo with the following structure:
- Uses Cloudflare Workers for backend deployment
- iOS app is part of the monorepo
- CLI tool `nizzy` helps manage environment and sync operations

## IMPORTANT RESTRICTIONS

- **NEVER run project-wide lint/format commands** (`pnpm check`, `pnpm lint`, `pnpm format`, `pnpm check:format`)
- These commands format/lint the entire codebase and cause unnecessary changes
- Only use targeted linting/formatting on specific files when absolutely necessary
- Focus on the specific task at hand without touching unrelated files
Loading