feat: support function-based staged config#23
Conversation
📝 WalkthroughWalkthroughStaged task types were expanded and moved into 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/migrate-to-rstack-cli/references/lint-staged.mdx:
- Line 8: Update the “Unsupported Cases” section in the lint-staged migration
reference to remove function-based configs, since define.staged now supports
StagedTaskGenerator and StagedFunctionTask; retain only cases still unsupported,
such as CLI flags not forwarded by rs staged and behaviors outside supported
task types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1dafc75d-9c20-4e49-8954-ec5201c2aeb6
📒 Files selected for processing (3)
.agents/skills/migrate-to-rstack-cli/references/lint-staged.mdxpackages/rstack/src/config.tspackages/rstack/src/staged.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57939f3bcb
ℹ️ 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 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 address that feedback".
|
|
||
| 1. Replace direct `lint-staged` script invocations with `rs staged`. | ||
| 2. Move a plain task map into `define.staged` in `rstack.config.*`. | ||
| 2. Move the lint-staged config into `define.staged` in `rstack.config.*`. |
There was a problem hiding this comment.
Remove stale function-config caveat
When this skill migrates a project that uses a JavaScript/function-based lint-staged config, this broadened step now tells it to move the whole config into define.staged, but the same reference still says to keep standalone lint-staged when the workflow requires function-based configs. That contradiction can make the migration guidance stop or leave duplicate lint-staged setup even though define.staged now accepts these configs; update the Unsupported Cases section alongside this generalized step.
Useful? React with 👍 / 👎.
lint-staged accepts function-based configurations, but
define.stagedpreviously only typed plain task maps. This PR aligns the staged config types with lint-staged 16.4, including sync and async generators and function tasks, so these configurations can migrate to Rstack. It also updates the migration guidance to cover general lint-staged configs.