bench-rule-enable

Enables markuplint rules in the nu-validator bench config with flat or severity-override patterns.

611|63|Updated Sep 26, 2017
One-click install
npx skills add https://github.com/markuplint/markuplint --skill bench-rule-enable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bench-rule-enable
Source: https://github.com/markuplint/markuplint/tree/main/.claude/skills/bench-rule-enable
Command: npx skills add https://github.com/markuplint/markuplint --skill bench-rule-enable

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

A markuplint rule that exists in the rules registry does not affect nu-validator bench verdicts until it is explicitly added to tests/external/bench/config.ts, leaving fixtures stuck as nu-only and hiding spec-conformance coverage.

Core Features & Use Cases

  • Flat rule enablement: Adds '<rule-name>': true entries to the bench config for rules whose default behavior matches the spec-conformance lens, keeping entries alphabetical.
  • Severity override: Adds '<rule-name>': { severity: 'error' } for rules whose default severity is warning but whose cited spec text is a MUST / MUST NOT, with required inline justification comments.
  • Side-effect verification: Guides running yarn bench:update and yarn bench:compare, then inspecting diff snapshots to confirm nu-only fixtures flip to match-error and ml-only deltas are legitimate.
  • Use Case: A contributor adds the no-contradictory-aria-prop rule to the registry, but bench fixtures remain nu-only; this Skill walks them through enabling it in the bench config and validating the verdict change.

Quick Start

Enable the no-contradictory-aria-prop rule in the nu-validator bench config and verify the affected fixtures flip from nu-only to match-error.

Frequently Asked Questions about bench-rule-enable

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable a markuplint rule in the nu-validator bench?

Add '<rule-name>': true to the rules object in tests/external/bench/config.ts, keeping entries alphabetical. Then run yarn build --scope @markuplint/rules and yarn bench:update --target markuplint to see fixtures flip from nu-only to match-error.

Why is my markuplint rule not flagging bench fixtures?

The bench config curates rules explicitly with no preset extends, so a registered rule has no effect until added to tests/external/bench/config.ts. Also check that the rule actually matches the fixture's HTML pattern.

How do I override a rule's severity to error in the bench config?

Add '<rule-name>': { severity: 'error' } to bench/config.ts with an inline comment citing the MUST / MUST NOT spec text and explaining why the user-facing default stays at warning. Only errors flip ml state in the bench verdict logic.

When should I not add a rule to the bench config?

Do not enable a rule when both nu-validator and the cited spec are silent on the pattern, since it would inflate ml-only counts without a spec-aligned signal. For preset-defined virtual rules using nodeRules selectors, use the bench-virtual-rule skill instead.

Why did fixtures flip to ml-only after a severity override?

Severity overrides can flip match-clean fixtures to ml-only when markuplint becomes stricter than nu-validator. This is acceptable when the spec is a MUST / MUST NOT and the fixture filename includes -haswarn; otherwise back out the override as over-detection.