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

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/video-echo/src/Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function Audio(props: { audioTrack$: Observable<MediaStreamTrack | null> }) {
}
});

// biome-ignore lint/a11y/useMediaCaption: Not able to generate captions for this currently.
// oxlint-disable-next-line jsx-a11y/media-has-caption
return <audio className="h-full w-full" ref={ref} autoPlay playsInline />;
}

Expand Down
Loading
Loading