From a21134e5ac8af728205e3f68149dc3be54e5e485 Mon Sep 17 00:00:00 2001 From: Brace Sproul Date: Mon, 4 Aug 2025 11:44:42 -0700 Subject: [PATCH] docs: Remove formatter (#657) --- apps/docs/.prettierrc | 4 ---- apps/docs/examples.mdx | 54 +++++++++++++++++++++++++++--------------- apps/docs/package.json | 4 ++-- 3 files changed, 37 insertions(+), 25 deletions(-) delete mode 100644 apps/docs/.prettierrc diff --git a/apps/docs/.prettierrc b/apps/docs/.prettierrc deleted file mode 100644 index 222861c3..00000000 --- a/apps/docs/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tabWidth": 2, - "useTabs": false -} diff --git a/apps/docs/examples.mdx b/apps/docs/examples.mdx index 01ac9644..5570b8aa 100644 --- a/apps/docs/examples.mdx +++ b/apps/docs/examples.mdx @@ -33,58 +33,74 @@ If you want to try out Open SWE, but aren't sure where to start, here are a few Below are a series of examples you can try out: - - ```txt Create an Express-based API exposing CRUD endpoints for `/books`. + + ```txt + Create an Express-based API exposing CRUD endpoints for `/books`. Include request validation with `zod`, proper HTTP status codes, and an in-memory repository layer that can later be swapped for a database. Add Jest - tests covering happy-path and a “missing ISBN” error case. ``` + tests covering happy-path and a 'missing ISBN' error case. + ``` - ```txt Add a small WebSocket server (using `ws`) that tracks how many clients + ```txt + Add a small WebSocket server (using `ws`) that tracks how many clients are currently connected and broadcasts the updated count every 5 seconds. Expose a health-check HTTP route returning the same value for monitoring - tools. Provide a minimal HTML demo page that shows the live number. ``` + tools. Provide a minimal HTML demo page that shows the live number. + ``` - ```txt Implement a CLI (`src/sync-issues.ts`) that reads a `config.json` with + ```txt + Implement a CLI (`src/sync-issues.ts`) that reads a `config.json` with one or more GitHub repos, fetches their open issues via the GitHub REST API, and writes a local `issues.{owner}.{repo}.csv`. Use `yargs` for parsing and - include a `--since YYYY-MM-DD` flag to filter by creation date. ``` + include a `--since YYYY-MM-DD` flag to filter by creation date. + ``` - ```txt Build a middleware that issues short-lived access tokens and long-lived + ```txt + Build a middleware that issues short-lived access tokens and long-lived refresh tokens. Store refresh tokens in a signed, HttpOnly cookie and expose `/auth/refresh` to rotate them. Protect a sample route (`/profile`) and supply - Postman collections for login and refresh flows. ``` + Postman collections for login and refresh flows. + ``` - ```txt Design a generic cache interface with `get`, `set`, and `invalidate` + ```txt + Design a generic cache interface with `get`, `set`, and `invalidate` methods, then provide two adapters: an in-memory `Map` implementation and a Redis adapter (mock Redis with `ioredis-mock` for tests). Demonstrate - hot-swapping the adapter via an environment variable without code changes. ``` + hot-swapping the adapter via an environment variable without code changes. + ``` - ```txt Stand up an Apollo Server that federates data from the public + ```txt + Stand up an Apollo Server that federates data from the public JSONPlaceholder `/users` and `/posts` endpoints. Expose a `user(id)` query returning the user plus their posts in a single round-trip. Add schema-driven - TypeScript types (`codegen.yml`) and example queries in `README.md`. ``` + TypeScript types (`codegen.yml`) and example queries in `README.md`. + ``` - ```txt Create an endpoint that returns a time-limited pre-signed PUT URL for + ```txt + Create an endpoint that returns a time-limited pre-signed PUT URL for an S3 bucket (use `@aws-sdk/client-s3`). Include a small React demo (Vite) that lets a user pick an image and upload it directly. Validate MIME type on - the server before signing. ``` + the server before signing. + ``` - ```txt Publish an internal `/src/date` module that formats, parses, and - time-zone-converts dates using `luxon`. Support at least “en-US”, “de-DE”, and - “ja-JP”. Provide type-safe wrappers, exhaustive unit tests, and a benchmark - script comparing it to native `Intl.DateTimeFormat`. ``` + ```txt + Publish an internal `/src/date` module that formats, parses, and + time-zone-converts dates using `luxon`. Support at least 'en-US', 'de-DE', and + 'ja-JP'. Provide type-safe wrappers, exhaustive unit tests, and a benchmark + script comparing it to native `Intl.DateTimeFormat`. + ``` diff --git a/apps/docs/package.json b/apps/docs/package.json index 16846d92..8e6249cd 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -5,8 +5,8 @@ "private": true, "scripts": { "dev": "mint dev", - "format": "prettier --write .", - "format:check": "prettier --check .", + "format": "echo 'No formatting needed for docs' && exit 0", + "format:check": "echo 'No formatting needed for docs' && exit 0", "clean": "rm -rf .turbo || true" }, "devDependencies": {