Repository navigation
feat!: open-source ready — configurable, design system opt-in (0.5.0) - #1
Conversation
- nuxt-harness.config.{mjs,js,json} + harness(options): srcDir, i18n,
authComposables, dataComposables, allowServerImportsInApp, designSystem.
Defaults pass any plain Nuxt 4 app.
- Design-system rules ship no tokens and only run with `designSystem`;
allowed Tailwind palettes come from `designSystem.palettes`.
- Nuxt layers and the Nuxt 3 layout (srcDir: '.') are covered;
no-presenter-in-page understands Lazy/directory-prefixed/kebab names.
- `full` uses the app's package manager and any vitest.config.* extension.
- English messages and docs, neutral examples; docs examples are linted.
- examples/basic, CONTRIBUTING, CHANGELOG, SECURITY, issue/PR templates,
Node 22/24 CI matrix, pinned actions.
BREAKING CHANGE: design-system rules are off unless configured, and
navigateTo('/…') string paths are only reported when i18n is on.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
PR #1 sur nuxt-harness est ouverte — voici l'état de l'assessment : Statut : à ne pas merger pour l'instant (risque élevé)
Pistes de relecture suggérées :
Je ne merge pas sans demande explicite. Tu veux que je plonge dans le diff d'un fichier en particulier (ci.yml, config loader…) ? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7121f2055
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
| }, | ||
| create(context) { | ||
| const composables = new Set(context.options[0]?.composables ?? DEFAULT_COMPOSABLES) | ||
| const composables = new Set(context.options[0]?.composables ?? DEFAULT_AUTH_COMPOSABLES) |
There was a problem hiding this comment.
Track destructured auth state before redirects
When the newly supported useUserSession or useAuth composables are used in their common destructured form—such as const { loggedIn } = useUserSession(); if (!loggedIn.value) await navigateTo('/login')—the rule does not report the gate because VariableDeclarator only records identifier bindings, not properties from an ObjectPattern. This leaves auth redirects in pages and components undetected despite these composables now being enabled by default; record destructured bindings originating from configured auth calls as auth variables too.
Useful? React with 👍 / 👎.
Makes the harness usable on any Nuxt 4 app and removes everything specific to our own codebase.
What changes for users
fastandfull. Verified on a freshnuxt@4.6.0install with@nuxt/eslint:nuxt typecheck, type-aware ESLint and the layer rules all report correctly.no-hardcoded-color,no-off-palette-color-classandno-nested-border-boxonly run withdesignSysteminnuxt-harness.config.mjs. The allowed palettes come from the app (designSystem.palettes), and a tokens package can export the preset.harness(options):srcDir,i18n(auto-detected from@nuxtjs/i18n),authComposables(defaults cover nuxt-auth-utils, sidebase, supabase),dataComposables,allowServerImportsInApp.layers/<name>/…, andsrcDir: '.'for apps that kept the Nuxt 3 layout. Pages accept<LazyOrcX>,<ShopOrcCart>and kebab-case names.fullruns scripts with the app's package manager (bun/pnpm/yarn/npm) and findsvitest.config.{ts,mts,js,mjs}. Fixed a silent "0 files" run whengit ls-filesoverflowed its buffer (unignorednode_modules).Open-source cleanup
useApiQuery,readJsonBody,useEmojiUrl, evlog, CDN), the French doc links, and Worker/Cloudflare wording.test/docs.test.tslints every example ingold-standards.mdandarchitecture.md, so the docs can't teach code that breaks the rules. The old Presenter example usedtext-gray-900, which the palette rule banned.examples/basic(CI runs the packed tarball on it), CONTRIBUTING, CHANGELOG, SECURITY (GitHub private reporting), issue and PR templates,.editorconfig, a Node 22/24 matrix, SHA-pinned actions, and npm metadata.Breaking (0.5.0)
navigateTo('/…')string paths are only reported when i18n is on.After merge
Tag
v0.5.0: the README install commands point to it.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.