|
| 1 | +#### Obvious Typos or Spelling Errors |
| 2 | +- Spelling errors in component names, props, slots, or user-facing strings that affect readability |
| 3 | + |
| 4 | +#### Dead Code |
| 5 | +- Unused islands, framework components, scripts, or template branches that add client cost without affecting rendered behavior |
| 6 | + |
| 7 | +#### Astro Component Boundaries |
| 8 | +- When frontmatter data reaches client HTML, inline scripts, or hydrated islands, verify whether it was computed at build time or request time and whether exposing non-`PUBLIC_` env values, cookies, headers, sessions, `Astro.locals`, secrets, request-only data, or server-only APIs is intentional |
| 9 | +- Flag `.astro` templates that appear to assume frontmatter values are reactive in the browser |
| 10 | +- Flag framework components used only to render static markup when plain Astro markup would avoid unnecessary client JavaScript |
| 11 | + |
| 12 | +#### Hydration and Islands |
| 13 | +- `client:*` applies only to directly imported UI framework components, not `.astro` components or dynamic tags |
| 14 | +- Flag `client:load` on non-critical UI, missed `client:idle` or `client:visible` opportunities, `client:media` where the media query does not actually gate the interaction need, and over-hydration from large or overly numerous islands |
| 15 | +- Flag `client:only` without the framework string or without fallback content when the result is blank or confusing pre-hydration UI |
| 16 | + |
| 17 | +#### Server-to-Client Data Transfer |
| 18 | +- Flag hydrated framework component props or server-fetched data passed client-side without reducing to the minimal interaction payload; props crossing hydrated boundaries must use Astro-supported serializable types, so flag functions, class instances, circular objects, secrets, and unnecessarily large payloads. |
| 19 | +- `<script define:vars>` values are JSON-stringified and inline; flag secrets, large payloads, or repeated per-instance duplication |
| 20 | + |
| 21 | +#### Server Islands |
| 22 | +- Flag `server:defer` usage without required adapter support or without a fallback slot when deferred content needs a meaningful loading state |
| 23 | +- Props passed into `server:defer` islands must use Astro-supported serializable types; flag functions, circular objects, secrets, and large request objects |
| 24 | +- Flag `server:defer` uses that leak request-specific data into cacheable output or weaken privacy assumptions |
| 25 | + |
| 26 | +#### Template Safety |
| 27 | +- Treat `set:html` as a high-risk escape hatch; flag it unless the source is clearly trusted or sanitized |
| 28 | +- Flag unsafe or insufficiently validated dynamic values inserted into attributes, URLs, or raw markup |
| 29 | +- Flag fragile template structures, especially mixed `set:*` usage or conditional markup that changes HTML shape in surprising ways |
| 30 | + |
| 31 | +#### Scripts |
| 32 | +- Flag scripts with attributes other than `src` when unprocessed behavior causes avoidable per-instance duplication, bypasses bundling, or relies on server-only values |
| 33 | +- Flag framework hydration used for behavior that a small processed Astro script would handle |
| 34 | + |
| 35 | +#### Styles |
| 36 | +- Flag unnecessary `is:global` usage when scoped styles or a narrow `:global(...)` escape would do |
| 37 | +- Flag selectors that assume scoped CSS can style child component internals across a component boundary |
| 38 | +- Flag components that accept parent styling but fail to forward `class` and needed rest props |
| 39 | + |
| 40 | +#### Content and Assets |
| 41 | +- For structured Markdown/MDX/JSON content, flag ad hoc loading when Astro content collections would materially improve schema validation, typing, or route generation |
| 42 | +- Flag plain `<img>` or `public/` asset usage when the implementation appears to expect Astro image optimization, responsive behavior, fingerprinting, transforms, or import-time validation |
| 43 | + |
| 44 | +#### Markup and Accessibility |
| 45 | +- Flag non-semantic or fragile interactive markup, including inaccessible islands before hydration, invalid conditional HTML, or mixed Astro/framework composition that breaks keyboard or focus behavior |
0 commit comments