chore(website): lint guard against new static inline styles - #858
Merged
Conversation
Lands only now that all seven migration batches (#848-#857) are merged, so it never sees legacy code. Flags identifier-keyed members of a style object literal in apps/website/src; the style={{ '--x': value }} escape hatch uses string-literal keys and passes. Excluded: the two Satori OG-image files (inline-only by design - note the [slug] segment must be matched by wildcard, brackets are a glob character class), the dev-only primitives route, and specs. Verified with raw eslint: fires on an identifier-key probe, silent on a custom-property probe, zero hits on the OG file. Baseline is 18 warnings - exactly the documented dynamic-value sites from the batch reports - and 0 errors, so CI (which fails on errors only) stays green. Ships as 'warn'; the escalation to 'error' is a deliberate follow-up one release later. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
enabled auto-merge (squash)
August 29, 2026 23:24
Contributor
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.
What
The final PR of the substrate migration (plan, Task 7): an ESLint guard so new code cannot quietly reintroduce static inline styles. Deliberately last — landing it before batch 6b would have meant hundreds of suppressions; landing it now, it only ever sees new code.
no-restricted-syntax(warn) on identifier-keyed members of astyleobject literal inapps/website/src/**/*.tsx. The dynamic-value escape hatch —style={{ '--x': value }}— uses string-literal keys and passes untouched.Verified with raw eslint (nx's lint cache can serve stale results on rapid re-runs)
style={{ color: "red" }}) → fires.style={{ '--x': v }}) → silent.[slug]in an ignore glob is a character class — matched by wildcard instead).TIERS-driven grid templates, the toast's entrance animation). The warn list is the exception ledger.Escalation to
erroris a deliberate follow-up one release later, per the plan.The arc this closes
Project 2 is complete: ~877 style-prop sites and 12 embedded
<style>tags across 88 files migrated in 7 PRs (#848–#857), each verified element-by-element against production. Project 3 (the docs polish arc, from the findings audit) is now unblocked — every fix it needs (:hover,:focus-visible,:last-child, media queries) has a stylesheet to live in.🤖 Generated with Claude Code