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-contract-in-controllersenforce-ts-rest-in-controllers: deprecated alias of enforce-contract-in-controllers, removed
in the next major versionno-ambiguous-positional-parametersno-empty-boolean-callno-cross-contract-importsno-parallel-mongo-session-opsno-tests-in-contract-packagesrequire-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.
customRules enables no-tests-in-contract-packages from @clipboard-health/oxlint-config 3.0.0.
It reports only test files inside packages/contract-* directories, excluding
packages/contract-core.
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.