OptionalDefaultOptions adopt writes for a new adopter.
Default roots to scan when the repo doesn't name any.
Severity adopt writes for a NEW adopter. Never applied to an already-configured repo.
Longer explanation, shown by mj standards list.
Where the reasoning lives. Printed with every failure — a rule without a why gets ignored.
Stable, kebab-case identifier. Used as the config key — renaming one is a breaking change.
MJ version that introduced this check, e.g. '6.0.0'.
One line, imperative: what the check enforces.
Do the work. Must not throw for ordinary findings — return them as violations.
A standard, as registered.
The version contract
Sinceis the MJ version that introduced the check. A repo records the version it adopted against (standardsVersionin its config). Checks introduced after that version are reported as available, never enabled — so upgrading@memberjunction/standardscan add rules without changing any repo's result until a human runsmj standards adopt --upgrade.DefaultSeverityis whatadoptwrites into a repo's config when it first enables the check. It is a starting point for new adopters, not a live value: changing it here never changes an already-adopted repo, because the repo's config holds its own severity.That asymmetry is the whole point. Severity can decay forward (
warn→erroron a major, by the repo's own choice) and never backward into a repo that has already shipped.