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
13 changes: 9 additions & 4 deletions .github/workflows/docusaurus-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: TypeScript type check
run: npm run typecheck
run: pnpm run check-types

- name: Build site
run: npm run build
run: pnpm run build
env:
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
.env.development.local
.env.test.local
.env.production.local
.npmrc

npm-debug.log*
yarn-debug.log*
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
13 changes: 13 additions & 0 deletions .roo/roomotes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '1.0'

port: 3000

commands:
- name: Install prerequisites
run: mise install

- name: Install dependencies
run: pnpm install

- name: Start web server
run: nohup pnpm start > /tmp/web-dev.log 2>&1 &
4 changes: 2 additions & 2 deletions .roo/rules-code/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This file provides guidance to agents when working with code in this repository.

- Linting targets only /src; docs are excluded. Use "npm run lint:unused" to enforce removal of unused imports. See [package.json](package.json).
- Type checking uses tsc only (no emit); [tsconfig.json](tsconfig.json) is editor-focused. Run "npm run typecheck" locally; CI does not typecheck.
- Linting targets only /src; docs are excluded. Use "pnpm run lint:unused" to enforce removal of unused imports. See [package.json](package.json).
- Type checking uses tsc only (no emit); [tsconfig.json](tsconfig.json) is editor-focused. Run "pnpm run check-types" locally; CI does not check-types.
- Use Docusaurus @site alias for cross-root imports from theme/MDX; example at [src/theme/MDXComponents.ts](src/theme/MDXComponents.ts:2).
- Centralize external URLs in [src/constants.ts](src/constants.ts); consumed by [docusaurus.config.ts](docusaurus.config.ts:21) for navbar/footer.
- When moving docs, add redirects in [docusaurus.config.ts](docusaurus.config.ts:109); onBrokenLinks is warn ([docusaurus.config.ts](docusaurus.config.ts:40)) so missing redirects won’t fail CI.
Expand Down
2 changes: 1 addition & 1 deletion .roo/rules-debug/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This file provides guidance to agents when working with code in this repository.

- CI only builds, doesn't lint/typecheck ([.github/workflows/docusaurus-build.yml](.github/workflows/docusaurus-build.yml:29)). Run "npm run lint" and "npm run typecheck" locally before pushing.
- CI only builds, doesn't lint/check-types ([.github/workflows/docusaurus-build.yml](.github/workflows/docusaurus-build.yml:29)). Run "pnpm run lint" and "pnpm run check-types" locally before pushing.
- PostHog analytics silently skips if POSTHOG_API_KEY missing. Check [.env](.env) exists with key from [.env.example](.env.example).
- No test framework configured. Scripts exist in package.json but no test files or jest/vitest config present.
- Docusaurus dev server at localhost:3000. Hot reload may fail for theme swizzled components; restart if changes don't appear.
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Non-obvious, project-specific rules:

- Start/build preload dotenv; analytics plugin is enabled only when POSTHOG_API_KEY is set. Use .env based on [.env.example](.env.example). CI injects it in [.github/workflows/docusaurus-build.yml](.github/workflows/docusaurus-build.yml). See [package.json](package.json) and [docusaurus.config.ts](docusaurus.config.ts).
- Use Node 20 locally to match CI; engines allow >=18 but CI runs 20.
- Linting targets only /src; docs content is not linted. Use "npm run lint:unused" to enforce unused import removal. Type checking uses "tsc" only (no emit); [tsconfig.json](tsconfig.json) is editor-focused.
- Linting targets only /src; docs content is not linted. Use "pnpm run lint:unused" to enforce unused import removal. Type checking uses "tsc" only (no emit); [tsconfig.json](tsconfig.json) is editor-focused.
- When moving/renaming docs, you must add an explicit redirect in [docusaurus.config.ts](docusaurus.config.ts) under plugin-client-redirects. This is required by [.roorules](.roorules).
- Internal doc links must be absolute and extensionless per [.roorules](.roorules) (example: /basic-usage/how-tools-work). Do not include ".md".
- Images in docs must use HTML tags per [.roorules](.roorules): <img src="/img/...png" alt="..." width="600" />.
Expand All @@ -16,4 +16,4 @@ Non-obvious, project-specific rules:
- Navigation/footer links are centralized in [src/constants.ts](src/constants.ts) and consumed by [docusaurus.config.ts](docusaurus.config.ts). Update constants rather than hardcoding URLs.
- Legacy [Rakefile](Rakefile) is unrelated (Jekyll). Do not use it; all builds run through Docusaurus scripts.
- For structural/formatting research, use Context7 MCP (ID "/facebook/docusaurus") via [.roo/mcp.json](.roo/mcp.json); see [.roorules](.roorules).
- CI only builds (no lint/typecheck). Run lint and typecheck locally to catch issues CI won't.
- CI runs build and check-types (no lint). Run lint locally to catch issues CI won't.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
### Installation

```
$ npm install
$ pnpm install
```

### Local Development

```
$ npm start
$ pnpm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Expand Down
82 changes: 82 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import js from "@eslint/js"
import tseslint from "@typescript-eslint/eslint-plugin"
import tsparser from "@typescript-eslint/parser"
import react from "eslint-plugin-react"
import reactHooks from "eslint-plugin-react-hooks"
import unusedImports from "eslint-plugin-unused-imports"

export default [
js.configs.recommended,
{
files: ["src/**/*.{js,jsx,ts,tsx}"],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
globals: {
console: "readonly",
document: "readonly",
window: "readonly",
process: "readonly",
module: "readonly",
require: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
setInterval: "readonly",
clearInterval: "readonly",
fetch: "readonly",
URL: "readonly",
HTMLElement: "readonly",
HTMLDivElement: "readonly",
Element: "readonly",
Node: "readonly",
NodeList: "readonly",
Event: "readonly",
KeyboardEvent: "readonly",
MouseEvent: "readonly",
CustomEvent: "readonly",
localStorage: "readonly",
sessionStorage: "readonly",
navigator: "readonly",
location: "readonly",
history: "readonly",
MutationObserver: "readonly",
ResizeObserver: "readonly",
IntersectionObserver: "readonly",
requestAnimationFrame: "readonly",
cancelAnimationFrame: "readonly",
JSX: "readonly",
SVGSVGElement: "readonly",
},
},
plugins: {
"@typescript-eslint": tseslint,
react,
"react-hooks": reactHooks,
"unused-imports": unusedImports,
},
rules: {
...tseslint.configs.recommended.rules,
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"no-unused-vars": "off",
},
settings: {
react: {
version: "detect",
},
},
},
{
ignores: ["node_modules/**", "build/**", ".docusaurus/**"],
},
]
Loading