Config File
chant uses a chant.config.ts file at the project root for configuration.
Minimal Config
Section titled “Minimal Config”export default { lexicons: ["aws"],};Full Config
Section titled “Full Config”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"], },};Fields
Section titled “Fields”lexicons
Section titled “lexicons”An array of lexicon names the project uses.
lint.extends
Section titled “lint.extends”An array of preset configuration paths to inherit from:
extends: ["@intentius/chant/lint/presets/strict"]lint.rules
Section titled “lint.rules”A map of rule ID to severity or [severity, options] tuple:
rules: { "EVL001": "error", "COR009": ["warning", { max: 12 }],}lint.overrides
Section titled “lint.overrides”File-specific rule overrides using glob patterns:
overrides: [ { files: ["src/legacy/**/*.ts"], rules: { "EVL001": "warning" }, },]lint.plugins
Section titled “lint.plugins”An array of plugin paths to load custom lint rules:
plugins: ["./lint-rules/org-standards.ts"]Config Resolution
Section titled “Config Resolution”- Load
chant.config.tsfrom the project root - Resolve and merge all
extendspresets (in order) - Apply local
ruleson top - Load
plugins - At lint time, apply
overridesto matching files