Skip to content

rules: crawl/all-noindex-pages declares optionsSchema outside meta, so its options are never validated #511

Closed

Description

@nc9

Found while fixing #496.

crawl/all-noindex-pages (packages/rules/src/crawl/all-noindex-pages.ts) declares optionsSchema beside meta, not inside it. The runner only parses rule.meta.optionsSchema (packages/rules/src/runner.ts, getRuleOptions), so this rule's options are never validated and its defaults are never applied: it reads the raw warnOnPatterns / errorOnPatterns with || []. A wrong type (warnOnPatterns = "/blog/") reaches matchesExcludePattern as a string instead of failing with a clear error.

The documented keys do work (verified by an audit from source: errorOnPatterns = ["/blog/"] turned a noindexed /blog/post/ into critical-noindex fail).

Acceptance Criteria

  • crawl/all-noindex-pages declares its optionsSchema in meta, so the runner applies its defaults and rejects a wrong type like every other rule
  • A test shows warnOnPatterns / errorOnPatterns still take effect, and a non-array value is rejected

Activity

  1. added
    bug
    P3
    size: XS
    rules
    on Oct 6, 2026
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

    P3bugrulessize: XS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions