Repository navigation
Conversation
…1261 Signed-off-by: Nik Cubrilovic <[email protected]>
…x entries in preflight #1261 Signed-off-by: Nik Cubrilovic <[email protected]>
Contributor
Author
|
Landed in v0.0.143 as nik |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1261
What changed
eeat/about-pagerecognises/wer-wir-sindand/unsere-geschichte(also under/pages/, with a trailing slash or.html)./team,/the-team,/das-team,/agenturand/agencyare 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.pathsoption (array of strings, max 50, each 1 to 512 characters, default[]) oneeat/about-page,eeat/contact-pageandeeat/privacy-policy, checked before the built-in slugs. Patterns usematchesExcludePattern, the same matcher asexcludePatterns: a substring of the path,/exact-segment/, orregex:. 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 theprivacy-linkedcoverage.optionsSchema, so the existing rule-options preflight (squirrel config validate, the audit's preflight) flags apathsvalue that is not an array of strings and listspathsamong the rule's options.perRuleTallychange (golden pins did not move).legal/privacy-policyshares 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.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 wholescripts/test-suites.ts --run rulessuite (8170 pass, 0 fail),make validateindocs/, tsgo on rules and utils.squirrel auditagainst a real Shopify or Storyblok site. Local Bun is not the pinned 1.4.4.Open points
pathsuses substring semantics by default (theexcludePatternsmatcher), sopaths = ["/pages/manufaktur"]also matches/pages/manufaktur-extra; use/pages/manufaktur/orregex:for an exact match. Documented.Docs:
docs/rules/eeat/about-page.mdx,contact-page.mdx,privacy-policy.mdx(Options tables) anddocs/configuration/rule-options.mdx. Skill: none.Review round 1 (head eddba09)
pathsnow match the URL path only (never host, query or fragment):manufakturno longer matches every page on manufaktur.de,/pages/manufakturno longer matches?next=/pages/manufaktur. Tests for host, query and fragment non-matches; docs say so.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. NewexcludePatternErrorhelper in@squirrelscan/utils.pathsand path-semantics tests fail without the source.