Skip to content

feat: support function-based staged config#23

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/feat-staged-function-config
Jul 11, 2026
Merged

feat: support function-based staged config#23
chenjiahan merged 1 commit into
mainfrom
chenjiahan/feat-staged-function-config

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

lint-staged accepts function-based configurations, but define.staged previously 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.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Staged task types were expanded and moved into staged.ts, including sync and async generators, function-based tasks, task unions, and configuration types. config.ts now imports the shared StagedConfig type instead of declaring local staged types. The lint-staged migration reference now instructs replacing direct invocations with rs staged and moving configuration into define.staged in rstack.config.*.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding support for function-based staged config.
Description check ✅ Passed The description is directly related to the changeset and accurately describes the staged config type updates and migration guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chenjiahan/feat-staged-function-config

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5c92b03 and 57939f3.

📒 Files selected for processing (3)
  • .agents/skills/migrate-to-rstack-cli/references/lint-staged.mdx
  • packages/rstack/src/config.ts
  • packages/rstack/src/staged.ts

Comment thread .agents/skills/migrate-to-rstack-cli/references/lint-staged.mdx
@chenjiahan chenjiahan merged commit be9776a into main Jul 11, 2026
4 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/feat-staged-function-config branch July 11, 2026 01:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.*`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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