[DEV-1822] Document the four non-routing boot-lint rules and rule severity - #293
Open
galisufyan-327 wants to merge 4 commits into
Open
[DEV-1822] Document the four non-routing boot-lint rules and rule severity#293galisufyan-327 wants to merge 4 commits into
galisufyan-327 wants to merge 4 commits into
Conversation
…rity The boot-HTML lint tells the AI builder that each violation's ruleId maps to a row in routing.md's forbidden-patterns table, but that table only ever covered the eight routing rules. duplicate-fliplet-require, undeclared-lazy-name, get-contents-as-module-default-access and font-awesome-not-available had no row anywhere, so the pointer was a dead end for the large majority of violations users actually hit. Give the four non-routing rules their own forbidden-patterns table on the app bootstrap page, cross-linked both ways with the routing one, and add the severity column now that the lint grades rules into block (refuses the save) and warn (deploys, reports alongside). Also make the declaration prerequisite explicit where the doc introduces Fliplet.require.lazy: the engine resolves only names the page declared, which is what undeclared-lazy-name fires on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
State the real registered-lazy declaration shape (latest: '', lazy: true) and the add_dependencies wire shape, name the TypeError the .default access actually throws, widen that rule to any .default read, and drop the citation of a lint rule that does not exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing lints the viewport meta, so the warning promised enforcement that does not exist. The constraint itself is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
createBrowserRouter blocks but the HashRouter component only warns; the routing page covers routing rules only, not every forbidden pattern; and the boot-HTML lint enforces the first two bootstrap constraints, not all four. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploying fliplet-cli with
|
| Latest commit: |
e0bfa86
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://57e2409b.fliplet-cli.pages.dev |
| Branch Preview URL: | https://fix-dev-1822-boot-lint-rulei.fliplet-cli.pages.dev |
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.
Product areas affected
Developer docs only (
docs/API/v3/) —app-bootstrap.md,routing.md,frameworks/react.md, plus the regenerated.well-known/search-index artifacts. No CLI code, no runtime behaviour.What does this PR do?
The Studio V3 AI builder lints generated boot HTML, and on rejection tells the model: each violation carries a
ruleIdthat maps to a row in the routing.md "Forbidden patterns" table — use the table to find the canonical replacement.That table documented only the 8 routing rules. Four rules had no row anywhere in the docs — and per 90 days of production data those four are 96% of all real violations:
duplicate-fliplet-requireget-contents-as-module-default-accessundeclared-lazy-namefont-awesome-not-availableSo the docs pointer was a dead end for almost every rejection a real user hits. This PR gives all four a row in
app-bootstrap.md, cross-linked both ways with the routing table.It also adds a Severity column to both tables, because the paired Studio PR splits the lint into two tiers: blocking rules refuse the save, warn rules deploy and return
warningsalongside a successful save. The docs previously couldn't express that distinction at all — notably thatcreateBrowserRouterblocks while<HashRouter>only warns.Three inaccuracies were corrected along the way, each verified against
lintV3Boot.js:undeclared-lazy-nameremedy was wrong. It said registered Fliplet packages "are declared by plain name and loaded withFliplet.require.lazy.chain('name')". A plain-name declaration is eager (addDependencies.js:17-18), so the name never lands inwindow.ENV.dependencies.lazyandlazy.chainrejects at runtime. Worse, the lint can't catch it —declaredLazyis built from every page dependency regardless of itslazyflag — so following that advice produced boot HTML that passed the lint and failed in the app. Now states the real{ latest: '', lazy: true }shape, and the tool's true{ dependencies: [ … ] }wire shape rather than the flat house shorthand.app-bootstrap.mdcitedviewport-not-locked; no such rule is inlintV3Boot.jsor anywhere in Studio'ssrc/v3/ai/. The viewport requirement is real and stays — the claim that the lint enforces it is gone.get-contents-as-module-default-accessrow described the failure as ".defaultisundefined" (it's a hardTypeError: <id>.default is not a function) and narrowed the forbidden pattern to<id>.default(...)when the rule fires on any.defaultaccess.Finally, three statements elsewhere in the doc set that the new severity column contradicted:
frameworks/react.md("both are rejected by lint"),routing.md's frontmatter description ("the full list of forbidden patterns"), andapp-bootstrap.md's intro (blanket lint-rejection across all four constraints, when only constraints 1 and 2 have rules).JIRA ticket
DEV-1822
Result
Every ruleId the lint can emit now has a documented row with a severity and an actionable remedy — 12 rules across two tables, 8 routing + 4 non-routing, cross-linked in both directions.
Both severity tables were audited row by row against
lintV3Boot.js, including the two rules emitted outside theRULESarray (undeclared-lazy-name,get-contents-as-module-default-access— bothblock) and the twoRULESentries that shareruleId: 'path-dispatcher'(bothwarn, correctly collapsed to one row).Checklist
Docs-only, so the applicable coverage is this repo's own CI gates, both re-run on the final commit:
npm run check:docs(strict — frontmatter, capabilities, and cross-link validation; 203 docs, exit 0) andnpm run test:unit(163/163 pass). Both new anchors resolve and no inbound cross-reference breaks.Deployment instructions
None — docs publish on merge.
Should land with the paired Studio PR Fliplet/fliplet-studio#8872, which is where the severity split these tables document actually lives. Merging this first would describe behaviour that isn't shipped yet; merging Studio first leaves the tool error pointing at a table that still has no row for 96% of violations.
Author concerns
.well-known/artifacts are regenerated build output, committed in the same commits per this repo's convention (094ad63,0064828,cb6d473). Every changed artifact line was traced to a source edit:llms.txtandagent-skills/fliplet-js-api/SKILL.mdcarry therouting.mddescription change,index.jsonthe resultingsha256,llms-full.txtthe three body edits, andllms-v3-libraries.jsononly itsgeneratedAtbump. Re-running the generator reproduces them byte-identically apart from that timestamp.app-bootstrap.md:82renders`Fliplet.require(...)`verbatim — in the very doc the block error tells the model to fetch while it is retrying that rule. The paired Studio PR removes that exact string from the always-present builder prompt on the hypothesis that verbatim rendering drives the 76% copy rate. A "what's forbidden" column can't name the pattern without showing it, and the lint's own guidance string already puts the same text in the model's context on every block — so this is defensible, but it means the prompt rewrite alone doesn't close the mechanism hypothesis.require(, declared lazy names, no.default), and nothing detects a<script src="cdn…">tag, animport, or a missinggetContentsfetch. A reader could infer "lint clean ⇒ constraints satisfied". Same class as the claims this PR swept, much smaller magnitude.app-bootstrap.md's frontmatter description doesn't mention the new rule table, so none of the four ruleIds is findable viasearch_fliplet_docs. Low impact: the load-bearing path doesn't go through search — the block error namesfetch_fliplet_doc({ path: 'API/v3/app-bootstrap.md' })directly, and that path is a hardcoded entry point in the builder'sdocs-lookup.md. Only the fuzzy-search route is degraded.routing.md's description is 170 chars against the ≤160 budget indocs/CLAUDE.md. Improved from master's 175 but still over;check:docs --strictdoes not enforce length. Left as-is rather than triggering another review round on a cosmetic overrun that predates this change.