Repository navigation
docs: add next/root-params and named JSX placeholders - #15
Merged
Merged
Conversation
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>
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.
Two gaps found while checking the skills against recent Lingui docs.
lingui-framework-setup): the RSC tutorial now reads the locale withnext/root-paramson 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 passingparams, because its root layout sits above[locale]. The reference also says to uselinguiMacroSwcPlugin()whenlingui.configsets macro options, since the SWC plugin never reads the config.lingui-best-practices):macro.jsxPlaceholderAttributeandmacro.jsxPlaceholderDefaultswere 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 theno-unnamed-tag-placeholdersESLint rule.Tested:
claude plugin validate .andclaude 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.