Skip to content

Linting & Type-Checking

llms.txt lists every page for an agent
Optional: hand this page to your coding agentThe steps work by hand too.
Show the whole prompt
Read https://intentius.io/chant/guide/linting/.
Run `npx chant lint` in this chant project, then `npx chant build` for the post-synth checks.
Fix each EVL and COR finding in source, and report any finding you left with its reason.
Open a pull request when both pass.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.

chant has a built-in linter for your resource files. Run it with:

Terminal window
chant lint

A clean project produces no output. Errors and warnings are printed to stderr:

src/data-bucket.ts:5:3 error [EVL001] expression in property "name" is not statically evaluable
src/api.ts:12:1 error [EVL002] resource declaration must not be inside an if statement

Lint runs two layers in one pass:

  1. Evaluability rules (EVL) check that every resource property can be evaluated statically. See Evaluability Rules.
  2. Correctness & style rules (COR) check structure: missing exports, circular dependencies, naming conventions. See Correctness Rules.

Additionally, chant build runs post-synth checks against the serialized output (YAML, JSON, etc.). These lexicon-specific rules catch problems visible only in the generated output. Examples are security misconfigurations, missing health probes, and invalid container commands. See your lexicon’s lint rules documentation for the full list.

FlagFormat
(default)Styled terminal output
--format jsonJSON array of diagnostics
--format sarifSARIF 2.1.0 for CI integrations
Terminal window
chant lint --format json

Re-run lint automatically on file changes:

Terminal window
chant lint --watch

Rules are configured in chant.config.ts. See Rule Configuration.

chant