Skip to content

feat(rules): paths option and German slugs for the E-E-A-T page rules - #1299

Closed
nc9 wants to merge 2 commits into
mainfrom
feat/eeat-page-paths-1261
Closed

nc9 wants to merge 2 commits into
mainfrom
feat/eeat-page-paths-1261

Conversation

@nc9

@nc9 nc9 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1261

What changed

  • eeat/about-page recognises /wer-wir-sind and /unsere-geschichte (also under /pages/, with a trailing slash or .html).
  • /team, /the-team, /das-team, /agentur and /agency are deliberately NOT built-in slugs (a team page is often not an About page, an agency page is often a service page); a test pins that, and the docs say so.
  • New paths option (array of strings, max 50, each 1 to 512 characters, default []) on eeat/about-page, eeat/contact-page and eeat/privacy-policy, checked before the built-in slugs. Patterns use matchesExcludePattern, the same matcher as excludePatterns: a substring of the path, /exact-segment/, or regex:. A crawled page at a configured path satisfies the rule with no schema type; a configured path that pages link to but the crawl did not fetch is reported as linked but not crawled, as for a built-in slug; on the privacy rule, links to a configured path count toward the privacy-linked coverage.
  • The option is declared in each rule's optionsSchema, so the existing rule-options preflight (squirrel config validate, the audit's preflight) flags a paths value that is not an array of strings and lists paths among the rule's options.
  • No rule added or removed, rule count unchanged, no perRuleTally change (golden pins did not move). legal/privacy-policy shares the privacy helpers and is unchanged (it passes no paths).

Tests (failing first)

  • packages/rules/tests/eeat-page-paths-1261.test.ts (30 tests); with the source reverted, the new tests fail.
  • Passing: that file, eeat-about-contact-not-crawled, rule-options-check, docs-rule-pages, docs-category-table, rule-verdict-scope, meta-string-limits, max-rules-limit, template-verdict-inputs, template-verdict-page-independence, streaming-rules-canonical-golden, the whole scripts/test-suites.ts --run rules suite (8170 pass, 0 fail), make validate in docs/, tsgo on rules and utils.
  • Not run: an end-to-end squirrel audit against a real Shopify or Storyblok site. Local Bun is not the pinned 1.4.4.

Open points

  • paths uses substring semantics by default (the excludePatterns matcher), so paths = ["/pages/manufaktur"] also matches /pages/manufaktur-extra; use /pages/manufaktur/ or regex: for an exact match. Documented.

Docs: docs/rules/eeat/about-page.mdx, contact-page.mdx, privacy-policy.mdx (Options tables) and docs/configuration/rule-options.mdx. Skill: none.

Review round 1 (head eddba09)

  • paths now match the URL path only (never host, query or fragment): manufaktur no longer matches every page on manufaktur.de, /pages/manufaktur no longer matches ?next=/pages/manufaktur. Tests for host, query and fragment non-matches; docs say so.
  • A regex: entry that does not compile is reported by the rule-options preflight ([rule_options."eeat/about-page"] paths.1: not a valid regular expression ...) instead of never matching and warning on every call. New excludePatternError helper in @squirrelscan/utils.
  • Corrected the test claim: I do not state a failing count for the whole file any more; the revert check is that the new German-slug, paths and path-semantics tests fail without the source.

@nc9 nc9 mentioned this pull request Oct 30, 2026
@nc9

nc9 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Landed in v0.0.143 as f258918b 4eb96e19 via #1341. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.143. Closing this original.

nik

@nc9 nc9 closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eeat/about-page: more German slugs and a paths option for site-specific about pages

1 participant