Skip to content

fix(create): remove nested monorepo lint config - #2667

Open
semimikoh wants to merge 1 commit into
voidzero-dev:mainfrom
semimikoh:fix/create-monorepo-lint-config
Open

fix(create): remove nested monorepo lint config#2667
semimikoh wants to merge 1 commit into
voidzero-dev:mainfrom
semimikoh:fix/create-monorepo-lint-config

Conversation

@semimikoh

Copy link
Copy Markdown
Contributor

Summary

  • remove the generated library lint block when scaffolding a Vite+ monorepo
  • preserve the lint configuration for standalone vite:library projects
  • add an AST-based top-level config key removal helper and regression coverage

Fixes #2640

Test plan

  • cargo test -p vp_migration remove_config_key
  • cargo fmt --check -- crates/vp_migration/src/vite_config.rs crates/vp_migration/src/lib.rs packages/cli/binding/src/migration.rs
  • git diff --check

@fengmk2

fengmk2 commented Sep 11, 2026

Copy link
Copy Markdown
Member

Can you add a new snapshot test case to cover this bug fix?

@fengmk2 fengmk2 self-assigned this Sep 11, 2026
@fengmk2

fengmk2 commented Sep 11, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T08:13:37.047660Z dd80e94 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@semimikoh
semimikoh force-pushed the fix/create-monorepo-lint-config branch from dd80e94 to e988fd6 Compare September 11, 2026 08:08

@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: dd80e94f48

ℹ️ 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".

Comment thread crates/vp_migration/src/vite_config.rs Outdated
Comment thread packages/cli/src/create/templates/monorepo.ts
The standalone library template enables lint type checking, but nested lint configuration is not supported in monorepos.

Remove the generated library's lint block during monorepo scaffolding while preserving it for standalone libraries. Apply the cleanup when adding libraries to existing monorepos as well.

Use an AST-based config-key transform restricted to direct config objects, and add CLI snapshot coverage for both creation paths.
@semimikoh
semimikoh force-pushed the fix/create-monorepo-lint-config branch from e988fd6 to 9932a48 Compare September 11, 2026 09:12
@semimikoh

Copy link
Copy Markdown
Contributor Author

@fengmk2 I added snapshot test coverage for this bug fix. Thanks for the suggestion!

@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests labels Sep 11, 2026
@fengmk2

fengmk2 commented Sep 11, 2026

Copy link
Copy Markdown
Member

@semimikoh According to the description at #2668, the lint and fmt configurations do not support nested configurations, so we need to further process the fmt field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp create monorepo vite.config.ts is invalid

2 participants