docs: add missing comma between mapState spreads in the Options API example#3130
Conversation
|
PR changed again? Review this PR in Change Stack to compare snapshots and stay oriented. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates a single code example in the Pinia state documentation. Line 166 of ChangesState Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The Options API
mapState()example incore-concepts/state.mdis missing a comma between its two object-spreadcomputedentries:Two spread elements in an object literal with no comma between them is a hard
SyntaxError. Verified withnode --check: the snippet throwsSyntaxError: Unexpected token '...'at the second...mapState(...), so anyone copying this example verbatim cannot run it.Change
Add the missing trailing comma after
...mapState(useCounterStore, ['count']). After the fix,node --checkparses the example cleanly. One-character, docs-only change; no semantics altered.The same fix was already applied to the Chinese translation of this file in #3102 — this brings the English source in line.
Summary by CodeRabbit