Clipboard's custom Oxlint rules. Consumers should normally use the presets exported by
@clipboard-health/oxlint-config.
The package is independent of ESLint and @typescript-eslint. Its standard create(context)
rules are also re-exported by @clipboard-health/eslint-plugin for repositories that still use
ESLint.
enforce-ts-rest-in-controllersno-empty-boolean-callno-cross-contract-importsno-parallel-mongo-session-opsrequire-contract-fixture-constructionrequire-contract-response-parserequire-http-module-factoryrequire-run-validators-with-upsertrequire-zod-import-in-contractsUse the customRules preset from @clipboard-health/oxlint-config to register the plugin and
apply the shared controller, module, contract, and cross-contract-import scopes. The
contractFixtures preset enables fixture-construction checks in tests.
no-empty-boolean-call, require-contract-response-parse, and
require-run-validators-with-upsert are opt-in because their safe adoption scope is
repository-specific.
no-parallel-mongo-session-ops is also opt-in. Out of the box it covers Promise.all,
Promise.allSettled, Promise.race, and Promise.any. Repositories with their own
bounded-concurrency helpers must name them, or those call sites go unchecked:
"@clipboard-health/no-parallel-mongo-session-ops": [
"warn",
{ additionalPrimitives: ["batchPromiseAllWithLimit", "batchPromiseAllSettledWithLimit"] },
],
Exclude tests: app-level session objects such as session.sessionUserId share the name but are
unrelated to MongoDB sessions.