Skip to content

docs: rule-options reference documents options no rule reads #496

Closed

Description

@nc9

Found while fixing #478. docs/configuration/rule-options.mdx and a few other pages configure rule options that no rule reads, so copying them changes nothing. Rule options are looked up by exact rule id (packages/rules/src/runner.ts, getRuleOptions), and a rule with an optionsSchema parses them with zod, which drops unknown keys silently.

Checked by parsing every TOML block on the page and comparing it with the rule registry and each rule's optionsSchema:

docs/configuration/rule-options.mdx

  • content/article-links: min_external_links is not an option. The rule has short_min_external, medium_min_external, long_min_external (and *_min_internal, short_max_words, long_min_words).
  • links/orphan-pages, links/dead-end-pages: exclude_patterns is ignored. The option is excludePatterns (camelCase).
  • performance/ttfb and performance/dom-size name no rule: the ids are perf/ttfb and perf/dom-size, and ttfb's options are good_threshold / poor_threshold.
  • content/keyword-stuffing: min_word_count is not an option (density_threshold, min_occurrences, whitelist).
  • security/http-to-https: allow_localhost and allow_patterns are not options (sampleLimit only).
  • adblock/element-hiding, adblock/blocked-links: lists is not an option (maxMatchesToReport only).
  • a11y/skip-link: required is read by nothing; the rule takes no options.
  • crawl/all-noindex-pages: threshold is read by nothing (the rule reads warnOnPatterns / errorOnPatterns).

docs/configuration/rules.mdx

  • "core/og-*" in a disable list matches no rule: patterns support *, category/* and exact ids only (packages/utils/src/rule-pattern.ts), not a partial glob.

Related, lower priority: content/quality and ai/ai-content appear in disable lists on rules.mdx, cli/analyze.mdx, cli/init.mdx and rules/content/quality.mdx, but both rules are disabled: true in code and never load, so those entries do nothing. Also crawl/all-noindex-pages declares optionsSchema outside meta, so the runner never applies its defaults (the rule reads the raw options, so the documented keys still work).

Acceptance Criteria

  • Every [rule_options."..."] table in docs/configuration/rule-options.mdx names an existing rule id, and every key in it is an option that rule reads
  • No docs page uses a rule pattern that matchesRulePattern cannot match (such as core/og-*), or the page says the pattern is unsupported
  • bun x [email protected] check --strict passes

Activity

  1. added
    bug
    documentation
    P3
    size: S
    on Oct 6, 2026
  2. nc9 commented on Oct 6, 2026

    @nc9
    ContributorAuthor

    One more on rule-options.mdx: content/keyword-stuffing's density_threshold is a percentage (default 3, compared against (count / total) * 100 in packages/rules/src/content/keyword-stuffing.ts), but lines 206-225 and 762 write it as a fraction (0.03, 0.02, 0.05). That sets a threshold of a few hundredths of a percent, so any word past min_occurrences is flagged. examples.mdx had the same mistake and is fixed in the #478 PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3bugdocumentationsize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions