Add "severity"/"error" to rule in Configuration object, add corresponding documentation, resolve some new type-checking issues.

This commit is contained in:
David Anson 2025-09-18 21:21:12 -07:00
parent 1d2d3ed581
commit c6f248321e
13 changed files with 4030 additions and 688 deletions

View file

@ -61,8 +61,12 @@ for (const rule of rules) {
""
);
const ruleData = schema.properties[name];
const ruleProperties = ruleData.oneOf.at(-1).properties;
if (ruleProperties) {
const ruleProperties = Object.fromEntries(
Object.entries(
ruleData.oneOf.at(-1).properties
).filter(([ key ]) => key !== "severity")
);
if (Object.keys(ruleProperties).length > 0) {
section.push(
"Parameters:",
""