diff --git a/.github/workflows/claude-auto-fix-ci.yml b/.github/workflows/claude-auto-fix-ci.yml index bb1849a0e..1be2294fe 100644 --- a/.github/workflows/claude-auto-fix-ci.yml +++ b/.github/workflows/claude-auto-fix-ci.yml @@ -78,7 +78,7 @@ jobs: Repository: ${{ github.repository }} Fix the CI failures. Common fixes: - - Biome lint errors: Run `bun run format-lint` or `biome check --fix .` + - Biome lint errors: Run `bun run format-lint:fix` or `biome check --fix .` - Type errors: Run `bun run check-types` and fix reported issues - Test failures: Debug and fix the failing tests diff --git a/CLAUDE.md b/CLAUDE.md index da9208e56..39f528fc2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,12 +16,14 @@ This is a **Turbo monorepo** containing multiple applications and shared package - `bun run dev` - Start all applications in development mode - `bun run build` - Build all applications - `bun run check-types` - Run TypeScript checks across all apps -- `bun run format-lint` - Format and lint code using Biome +- `bun run format-lint` - Check formatting and lint with Biome (read-only) +- `bun run format-lint:fix` - Apply Biome's formatting and lint fixes ### Web Application (`apps/web/`) - `bun run dev` - Start Next.js development server - `bun run build` - Build Next.js application -- `bun run lint` - Run Next.js linting +- `bun run lint` - Check the web app with Biome (read-only) +- `bun run lint:fix` - Apply Biome's fixes to the web app ## Architecture Overview @@ -89,7 +91,7 @@ All content goes through the `IngestContentWorkflow` which handles: ### Linting & Formatting - **Biome** used for linting and formatting across the monorepo -- Run `bun run format-lint` to format and lint all code +- Run `bun run format-lint` to check all code; `bun run format-lint:fix` to apply fixes - Configuration in `biome.json` at repository root ### TypeScript diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index feb1ed416..ea80b9515 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -80,7 +80,8 @@ supermemory/ - `bun run dev:local` - Start dev servers on plain localhost ports (recommended for OSS contributors) - `bun run dev` - Start dev servers through portless (`*.dev.supermemory.ai`, internal team) - `bun run build` - Build all applications -- `bun run format-lint` - Format and lint code using Biome +- `bun run format-lint` - Check formatting and lint with Biome (read-only) +- `bun run format-lint:fix` - Apply Biome's formatting and lint fixes - `bun run check-types` - Type check all packages ### Code Quality @@ -99,6 +100,8 @@ bun run check-types bun run build ``` +These are read-only. To let Biome apply its fixes, run `bun run format-lint:fix`. + ### Tech Stack - **Frontend**: Next.js 15, React 19, TypeScript diff --git a/apps/web/package.json b/apps/web/package.json index cddbcd0af..fcf8052a3 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -11,7 +11,8 @@ "dev:app": "next dev --port ${PORT:-3000}", "build": "next build", "start": "next start", - "lint": "biome check --write", + "lint": "biome check", + "lint:fix": "biome check --write", "preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview", "deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy", "upload": "opennextjs-cloudflare build && opennextjs-cloudflare upload", diff --git a/package.json b/package.json index bceb3748c..61fab9213 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "build": "turbo run build", "dev": "turbo run dev", "dev:local": "turbo run dev:app", - "format-lint": "bunx biome check --write", + "format-lint": "bunx biome check", + "format-lint:fix": "bunx biome check --write", "check-types": "turbo run check-types", "sentry:sourcemaps": "_SENTRY_RELEASE=$(sentry-cli releases propose-version) && sentry-cli releases new $_SENTRY_RELEASE --org=supermemory --project=consumer-app && sentry-cli sourcemaps upload --org=supermemory --project=consumer-app --release=$_SENTRY_RELEASE --strip-prefix 'dist/..' dist", "postbuild": "bun run sentry:sourcemaps"