chore: make lint and format validation commands non-mutating

`format-lint` and the web app's `lint` both ran `biome check --write`, so
the commands CONTRIBUTING points at as pre-PR validation rewrote the
working tree instead of reporting on it.

Drop `--write` from both and move the auto-fixing behaviour to explicit
`format-lint:fix` / `lint:fix` scripts. CONTRIBUTING and CLAUDE.md are
updated to name the read-only commands, and the auto-fix CI workflow now
invokes `format-lint:fix`, since it relies on the fixes actually being
applied.

Fixes #1448
This commit is contained in:
Chirag 2026-08-13 14:37:48 +05:30
parent 59b148e5b2
commit c7e21bd52e
5 changed files with 14 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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",

View file

@ -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"