Skip to content

docs: add next/root-params and named JSX placeholders - #15

Merged
andrii-bodnar merged 1 commit into
mainfrom
docs/root-params-named-placeholders
Oct 20, 2026
Merged

andrii-bodnar merged 1 commit into
mainfrom
docs/root-params-named-placeholders

Conversation

@andrii-bodnar

Copy link
Copy Markdown
Contributor

Two gaps found while checking the skills against recent Lingui docs.

  • Next.js App Router (lingui-framework-setup): the RSC tutorial now reads the locale with next/root-params on Next 16.3+. The skill adds it as an option for the single-layout shape, where [locale] holds the root layout and so is a root param. The default two-layout pattern keeps passing params, because its root layout sits above [locale]. The reference also says to use linguiMacroSwcPlugin() when lingui.config sets macro options, since the SWC plugin never reads the config.
  • Named JSX placeholders (lingui-best-practices): macro.jsxPlaceholderAttribute and macro.jsxPlaceholderDefaults were in no skill. A new configuration section covers the setup, which name wins, the one-name-per-element rule, the TypeScript declaration, keeping SWC options in sync, the re-keying cost on a project that already has translations, and the no-unnamed-tag-placeholders ESLint rule.

Tested: claude plugin validate . and claude plugin validate skills --strict. Ran the named-placeholder cases through the Babel macro plugin. Root-param rules checked against the Next.js docs; not run in a Next 16.3 app.

lingui-framework-setup (Next.js App Router): the RSC tutorial now reads
the locale with next/root-params on Next 16.3+. Add that as an option
for the single-layout shape, where [locale] holds the root layout and
so is a root param; the default two-layout pattern keeps threading
params. Also say to use linguiMacroSwcPlugin() when lingui.config sets
macro options, because the SWC plugin never reads the config.

lingui-best-practices: named JSX placeholders (macro.jsxPlaceholderAttribute,
macro.jsxPlaceholderDefaults) were in no skill. Add a pointer next to
ph() and a configuration section: setup, precedence, the one-name rule,
the TypeScript declaration, keeping SWC options in sync, the re-keying
cost on a project with translations, and the no-unnamed-tag-placeholders
ESLint rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrii-bodnar
andrii-bodnar merged commit 3420ebb into main Oct 20, 2026
1 check passed
@andrii-bodnar
andrii-bodnar deleted the docs/root-params-named-placeholders branch October 20, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant