Skip to content

Config File

chant uses a chant.config.ts file at the project root for configuration.

chant.config.ts
export default {
lexicons: ["aws"],
};
chant.config.ts
export default {
lexicons: ["aws"],
lint: {
extends: ["@intentius/chant/lint/presets/strict"],
rules: {
"EVL001": "error",
"COR002": "warning",
"COR009": "off",
},
overrides: [
{
files: ["src/legacy/**/*.ts"],
rules: {
"EVL001": "warning",
"COR005": "off",
},
},
],
plugins: ["./lint-rules/org-standards.ts"],
},
};

An array of lexicon names the project uses.

Opt-in cloud-side ownership marking. When stack is set, the serializer stamps a chant ownership marker carrying this stack (and optional env) identity onto every supported resource at synthesis time:

ownership: {
stack: "billing", // stamped onto every resource (enables marking)
env: "prod", // optional environment identity
// enabled: false, // set to disable without removing the block
}

The marker is the record that later lets delete be precise without an authoritative state file — ownership lives on the cloud resource, not in a file chant has to host or lock. It is stamped into each target’s native metadata channel:

ChannelTargetsKeys
LabelsKubernetes, GCP (Config Connector)app.kubernetes.io/managed-by=chant, chant.intentius.io/stack, chant.intentius.io/env
TagsAWSchant:managed-by=chant, chant:stack, chant:env
TagsAzurechant-managed-by=chant, chant-stack, chant-env

The marker carries stack identity, not just managed=true, so one stack never mistakes another’s resources for its own. Ownership means “carries chant’s marker”, not “carries only chant’s marker” — co-stamping with other tools (ArgoCD, Terraform) is fine, and explicit per-resource tags/labels win on key collisions. Walk-away cost stays zero: these are standard tags/labels, nothing proprietary.

An array of preset configuration paths to inherit from:

extends: ["@intentius/chant/lint/presets/strict"]

A map of rule ID to severity or [severity, options] tuple:

rules: {
"EVL001": "error",
"COR009": ["warning", { max: 12 }],
}

File-specific rule overrides using glob patterns:

overrides: [
{
files: ["src/legacy/**/*.ts"],
rules: { "EVL001": "warning" },
},
]

An array of plugin paths to load custom lint rules:

plugins: ["./lint-rules/org-standards.ts"]
  1. Load chant.config.ts from the project root
  2. Resolve and merge all extends presets (in order)
  3. Apply local rules on top
  4. Load plugins
  5. At lint time, apply overrides to matching files