hypra

ALLOW-001: allow has no reason

Error: the page doesn't build until this is fixed.

allow switches a rule off for the next element. Its reason shows up in code review, so a rule is never switched off by accident or without anyone knowing why.

Fails

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  allow("SEO-003")
  h1 "Run faster."
}
error[ALLOW-001]: `allow` needs a written reason
 --> page.hypra:3:3
  |
3 |   allow("SEO-003")
  |   ^^^^^
  = help: allow("SEO-003") "why this rule doesn't apply here"
  = docs: https://hypralang.dev/rules/allow-001/

1 error, 0 warnings

Fixed

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  allow("SEO-003") "the hero splits its headline into two h1"
  h1 "Run faster."
}