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.

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