Reference

Linting

Rule catalog for @routecraft/eslint-plugin-routecraft.

Rules

RuleDefaultDescriptionAutofix
require-named-routeerrorEvery craft() chain must call .id(<non-empty string>) before .from()No
batch-before-fromwarn.batch() must appear before .from(); using it after has no effect on the current routeNo
single-to-per-routewarnEach craft() chain should have at most one .to(); extra outputs belong in .tap()No
restrict-principal-mintingerrorPrincipal minting (.authenticate(), authenticate(), markAuthentic()) is restricted to explicitly sanctioned sites (scoped disable comment or per-file override)No
require-untrusted-shell-argswarnAn exchange-derived value in shell() arguments must be wrapped in untrusted(), so it cannot pose as an option to the invoked programNo
capability-boundariesoff (opt-in)From outside a capability folder, import only its public-surface route.ts, never its internalsNo

Presets

PresetDescription
routecraftPlugin.configs.recommendedConvention rules at their default levels, plus restrict-principal-minting as an error and require-untrusted-shell-args as a warning
routecraftPlugin.configs.allConvention rules as errors (single-to-per-route stays a warning), plus restrict-principal-minting as an error and require-untrusted-shell-args as a warning

require-untrusted-shell-args warns rather than errors while its analysis is young: a misfiring warning is a nuisance in an editor, where a misfiring error fails a build. Raise it to error in your own config once you trust it on your codebase.

capability-boundaries is not in either preset. It encodes a specific repository layout (capabilities/<domain>/<capability>/route.ts), so it is opt-in only and must be enabled explicitly. See Capability boundaries.


Linting

Install, configure, and customise rule severity.

Formatting

Keep DSL chains compact with the Prettier plugin.

Project structure

The capability folder layout that capability-boundaries enforces.

Previous
Plugins