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
24 changes: 0 additions & 24 deletions .changeset/hibernation-awareness-fix.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
fetch-depth: 1

- uses: actions/setup-node@v4
with:
node-version: 25

- run: npm ci
- run: npm run build
Expand Down
6 changes: 6 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"trailingComma": "none",
"printWidth": 80,
"experimentalSortPackageJson": false
}
34 changes: 34 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "jsx-a11y", "typescript", "react-hooks"],
"categories": {
"correctness": "error"
},
"rules": {
"no-explicit-any": "off",
"no-unused-expressions": "off",
"no-this-alias": "off",
"no-non-null-assertion": "off",
"no-redeclare": "off",
"react-hooks/exhaustive-deps": "warn",
"jsx-a11y/no-autofocus": "off",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
},
"ignorePatterns": [
"**/dist",
"**/coverage",
"**/*.d.ts",
"**/*.d.mts",
"**/*.d.cts",
"**/env.d.ts",
"**/.wrangler",
"**/node_modules"
]
}
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

30 changes: 16 additions & 14 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ PartyServer is a **monorepo** using npm workspaces with multiple packages:
```bash
npm run build # Build all packages
npm run check # Run all checks (format, lint, type, test)
npm run format # Format code with Prettier
npm run check:format # Check code formatting
npm run check:lint # Run Biome linter
npm run format # Format code with Oxfmt
npm run check:format # Check code formatting with Oxfmt
npm run check:lint # Run Oxlint linter
npm run check:type # Type-check all packages
npm run check:test # Run all tests
npm run check:repo # Run sherif (monorepo consistency)
Expand Down Expand Up @@ -57,20 +57,22 @@ npx vitest reconnecting

### Formatting

- **Formatter**: Prettier (NOT Biome formatter - it's disabled)
- **Formatter**: Oxfmt (configured in `.oxfmtrc.json`)
- **Quote style**: Double quotes (`"`)
- **Trailing commas**: None
- **Line length**: Default Prettier settings
- **Print width**: 80
- Run `npm run format` before committing

### Linting

- **Linter**: Biome (configured in `biome.json`)
- Recommended rules enabled with specific overrides:
- `noNonNullAssertion`: off (non-null assertions allowed)
- `noParameterAssign`: off (parameter reassignment allowed)
- `noForEach`: off (forEach allowed)
- `noRedeclare`: off
- **Linter**: Oxlint (configured in `.oxlintrc.json`)
- Plugins: `react`, `jsx-a11y`, `typescript`, `react-hooks`
- Key rules:
- `no-explicit-any`: off
- `no-non-null-assertion`: off
- `no-redeclare`: off
- `no-unused-vars`: error (with `^_` ignore patterns for args/vars/caught)
- `react-hooks/exhaustive-deps`: warn
- Run `npm run check:lint` to verify

### TypeScript
Expand Down Expand Up @@ -139,9 +141,9 @@ function assert(condition: unknown, msg?: string): asserts condition {
- Use `// TODO:` for action items
- Use JSDoc for public API documentation
- Prefer descriptive names over comments
- Use `biome-ignore` or `@ts-expect-error` with explanations when necessary:
- Use `oxlint-disable-next-line` or `@ts-expect-error` with explanations when necessary:
```typescript
// biome-ignore lint/suspicious/noExplicitAny: legacy code
// oxlint-disable-next-line no-explicit-any
// @ts-expect-error ws types are weird
```

Expand Down Expand Up @@ -173,7 +175,7 @@ function assert(condition: unknown, msg?: string): asserts condition {

- Dual format: ESM and CommonJS
- Generate both `.d.ts` and `.d.cts` declaration files
- Run prettier on generated output files (handled by build scripts)
- Run oxfmt on generated output files (handled by build scripts)
- Use `tsdown` for building packages
- Verify exports with `scripts/check-exports.ts`

Expand Down
62 changes: 0 additions & 62 deletions biome.json

This file was deleted.

2 changes: 1 addition & 1 deletion fixtures/chat/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<title>PartyServer</title>
</head>
Expand Down
14 changes: 7 additions & 7 deletions fixtures/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
},
"dependencies": {
"nanoid": "^5.1.6",
"partyserver": "^0.3.0",
"partysocket": "^1.1.15",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"partyserver": "^0.3.1",
"partysocket": "^1.1.16",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.18",
"@types/react": "^19.2.7",
"@tailwindcss/vite": "^4.2.1",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"tailwindcss": "^4.1.18"
"tailwindcss": "^4.2.1"
}
}
12 changes: 6 additions & 6 deletions fixtures/globe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
},
"dependencies": {
"cobe": "^0.6.5",
"partyserver": "^0.3.0",
"partysocket": "^1.1.15",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"partyserver": "^0.3.1",
"partysocket": "^1.1.16",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20251218.0",
"@types/react": "^19.2.7",
"@cloudflare/workers-types": "^4.20260303.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3"
}
}
2 changes: 1 addition & 1 deletion fixtures/hono/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<link
rel="icon"
Expand Down
14 changes: 7 additions & 7 deletions fixtures/hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"types": "wrangler types env.d.ts --include-runtime false"
},
"dependencies": {
"hono": "^4.11.1",
"hono-party": "^2.0.1",
"partyserver": "^0.3.0",
"partysocket": "^1.1.15",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"hono": "^4.12.2",
"hono-party": "^2.0.2",
"partyserver": "^0.3.1",
"partysocket": "^1.1.16",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"devDependencies": {
"@types/react": "^19.2.7",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3"
}
}
2 changes: 1 addition & 1 deletion fixtures/lexical-yjs/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down
10 changes: 5 additions & 5 deletions fixtures/lexical-yjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"types": "wrangler types env.d.ts --include-runtime false"
},
"dependencies": {
"@lexical/react": "^0.39.0",
"lexical": "^0.39.0",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"@lexical/react": "^0.40.0",
"lexical": "^0.40.0",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"devDependencies": {
"@types/react": "^19.2.7",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3"
}
}
2 changes: 1 addition & 1 deletion fixtures/monaco-yjs/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down
2 changes: 1 addition & 1 deletion fixtures/monaco-yjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"monaco-editor": "^0.55.1",
"partysocket": "^1.1.15",
"partysocket": "^1.1.16",
"y-monaco": "^0.1.6"
}
}
2 changes: 1 addition & 1 deletion fixtures/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"types": "wrangler types env.d.ts --include-runtime false"
},
"dependencies": {
"partysocket": "^1.1.15"
"partysocket": "^1.1.16"
}
}
16 changes: 9 additions & 7 deletions fixtures/partytracks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,20 @@
<body>
<video muted autoplay id="local-video"></video>
<video muted autoplay id="remote-video"></video>
<audio id="audio"></audio>
<audio id="audio">
<track kind="captions" src="" srclang="en" label="English" />
</audio>
<select id="mic-select"></select>
<select id="camera-select"></select>
<button id="mic-broadcast-button"></button>
<button id="mic-enabled-button"></button>
<button id="camera-broadcast-button"></button>
<button id="camera-enabled-button"></button>
<button id="mic-broadcast-button" type="button"></button>
<button id="mic-enabled-button" type="button"></button>
<button id="camera-broadcast-button" type="button"></button>
<button id="camera-enabled-button" type="button"></button>
<hr />
<video muted autoplay id="local-screenshare-video"></video>
<video muted autoplay id="remote-screenshare-video"></video>
<button id="screenshare-broadcast-button"></button>
<button id="screenshare-source-enabled-button"></button>
<button id="screenshare-broadcast-button" type="button"></button>
<button id="screenshare-source-enabled-button" type="button"></button>
<script type="module" src="/src/client.tsx"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions fixtures/partytracks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"types": "wrangler types env.d.ts --include-runtime false"
},
"dependencies": {
"hono": "^4.11.1",
"hono": "^4.12.2",
"partytracks": "^0.0.55",
"rxjs": "^7.8.2"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20251218.0"
"@cloudflare/workers-types": "^4.20260303.0"
}
}
4 changes: 2 additions & 2 deletions fixtures/partytracks/src/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ pulledScreenshareVideoTrack$.subscribe((track) => {
});

const audioSink = createAudioSink({ audioElement: audio });
// biome-ignore lint/correctness/noUnusedVariables: it's fine
// oxlint-disable-next-line no-unused-vars
const pulledTrackSinkSubscription = audioSink.attach(pulledAudioTrack$);
// biome-ignore lint/correctness/noUnusedVariables: it's fine
// oxlint-disable-next-line no-unused-vars
const pulledScreenshareAudioTrackSinkSubscription = audioSink.attach(
pulledScreenshareAudioTrack$
);
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pubsub/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<title>PubSub</title>
</head>
Expand Down
Loading