Browse 354 rules, 42 knowledge articles, and 28 prompt templates across security, performance, architecture, and quality.
BeforeMerge scans your pull requests against these rules automatically. Get actionable feedback before code ships to production.
354 rules
Load analytics, chat, and third-party scripts with defer/async so they never block rendering.
Warm up DNS/TLS for required cross-origin hosts early with preconnect or dns-prefetch.
Serve hashed assets with long-lived immutable cache headers and enable Brotli/gzip compression.
Dynamically import below-the-fold and rarely-used components so the initial bundle stays small.
Self-host fonts, preload critical ones, and use font-display: swap to avoid invisible or shifting text.
Use the framework Image component with srcset and AVIF/WebP so each device downloads an appropriately sized, well-compressed image.
Break up long tasks and minimize hydration so the page responds quickly to clicks and taps.
Reserve space for images, ads, and dynamically injected content so the page does not jump while loading.
Make the main hero image or text render fast by prioritizing and preloading the LCP resource.
For all UI components, the name, role, state, and value must be programmatically determinable—use native elements or correct ARIA. (WCAG 2.1 SC 4.1.2)
When an input error is detected automatically, the erroring field must be identified and the error described in text. (WCAG 2.1 SC 3.3.1)
Form inputs must have visible labels or instructions describing the expected input. (WCAG 2.1 SC 3.3.2)
The default human language of each page must be set programmatically via the `lang` attribute. (WCAG 2.1 SC 3.1.1)
Every page must have a `<title>` that describes its topic or purpose. (WCAG 2.1 SC 2.4.2)
Any keyboard-focusable element must have a clearly visible focus indicator. (WCAG 2.1 SC 2.4.7)
Components must receive keyboard focus in an order that preserves meaning and operability. (WCAG 2.1 SC 2.4.3)
Keyboard focus must never become trapped in a component; users must be able to move away using only the keyboard. (WCAG 2.1 SC 2.1.2)
UI components (inputs, buttons, focus states) and meaningful graphics must have at least 3:1 contrast against adjacent colors. (WCAG 2.1 SC 1.4.11)
Content must reflow to a 320px-wide viewport (400% zoom) without requiring two-dimensional scrolling. (WCAG 2.1 SC 1.4.10)
Text must be resizable up to 200% without loss of content or functionality and without assistive technology. (WCAG 2.1 SC 1.4.4)
Color must not be the only means of conveying information, indicating an action, or distinguishing a visual element. (WCAG 2.1 SC 1.4.1)
When content order affects meaning, the DOM reading/navigation order must match the intended sequence. (WCAG 2.1 SC 1.3.2)
Structure and relationships conveyed visually (headings, lists, tables, form labels) must be available programmatically or in text. (WCAG 2.1 SC 1.3.1)
All prerecorded audio in synchronized media (video) must have captions. This makes speech and important sounds available to users who are deaf or hard of hearing. (WCAG 2.1 SC 1.2.2)