Skip to content

Lint Rules

Lint rules surface diagnostics without rewriting source. They run under both prose check and prose format, returning exit code 2 when any lint diagnostic fires, and they never produce an Edit. Lint coincides with its domain, in that every lint rule sits in the lint domain and every rule in the lint domain is a lint. The category-versus-domain distinction collapses cleanly to one landing.

bare-imports

Lint

Surfaces a narrowly-used bare import that from x import … would replace.

legacy-union-syntax

Lint

Surfaces Union[A, B] and Optional[T] patterns that should read as modern A | B and T | None.

line-overflow

Lint

Names any line still over its governing cap once no reshape can shorten it.

miscased-constants

Lint

Surfaces a module-level constant whose name is not SCREAMING_CASE.

reassigned-constants

Lint

Surfaces a module-level constant reassigned despite its UPPER_SNAKE_CASE casing.

signature-annotations

Lint

Flags a signature parameter or a value-returning function that carries no type annotation.

single-use-variables

Lint

Surfaces single-use local bindings that could inline cleanly.

step-narration

Lint

Surfaces comments that narrate the next line.

unsorted-positionals

Lint

Surfaces a run of positionally-bound names that sits out of alphabetical order.

Each lint surfaces a pattern Prose notices but won't itself resolve, because the right fix depends on intent the binary can't infer. The Suppression chapter covers per-line opt-outs via # prose: ignore[<rule>]. The Exit Codes reference covers the gating semantics. For the auto-fix companion landing, see the Auto-Fix Rules page. For the per-rule enabled facet, see the Configuration reference.