Skip to content

feat(check): support check.fmt/check.lint in vite.config.ts#1981

Open
fengmk2 wants to merge 5 commits into
mainfrom
feat/check-config-fmt-lint
Open

feat(check): support check.fmt/check.lint in vite.config.ts#1981
fengmk2 wants to merge 5 commits into
mainfrom
feat/check-config-fmt-lint

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Adds a check block to vite.config.ts that mirrors the vp check --no-fmt / --no-lint flags, so a project can make plain vp check skip formatting or linting by default.

export default defineConfig({
  check: {
    fmt: false, // vp check lints (and type-checks) but does not format
    lint: true,
  },
});

This is for teams that want most of the toolchain but not one step (e.g. lint only, no formatting), without anyone needing to remember a flag, and it keeps the generated AGENTS.md vp check guidance working as-is.

Behavior:

  • A step is skipped if config disables it or the matching flag is passed.
  • Config-based disabling only affects vp check; standalone vp fmt / vp lint and git-hook/staged are unaffected.
  • When config (not a flag) disables a step, vp check prints a short note: line for discoverability; existing CLI-flag output stays byte-identical.

Verification: new snap fixtures (check-config-no-fmt, check-config-no-lint, check-config-flag-precedence) and Rust unit tests for the config reader; existing check-* snaps unchanged; cargo clippy -p vite-plus-cli clean; manual runs confirm notes, scope, and the both-disabled error path.

Mirror the `vp check --no-fmt` / `--no-lint` flags as persistent config so a
project can make plain `vp check` skip formatting or linting by default,
without anyone needing to remember a flag.

- A step is skipped if config disables it or the matching flag is passed.
- Config-based disabling only affects `vp check`; standalone `vp fmt` /
  `vp lint` and git-hook/staged are unaffected.
- A short `note:` line is printed when config (not a flag) disables a step,
  for discoverability; CLI-flag output stays byte-identical.
@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit 0422f4c
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a420a4f79e7420008740e8a
😎 Deploy Preview https://deploy-preview-1981--viteplus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@fengmk2 fengmk2 self-assigned this Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 0422f4c

@fengmk2 fengmk2 added this to the Beta milestone Jun 29, 2026
@fengmk2

fengmk2 commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@codex review

@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: 9dda1de344

ℹ️ 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 packages/cli/binding/src/check/mod.rs
Comment thread docs/config/check.md Outdated
Comment thread packages/cli/src/define-config.ts Outdated
fengmk2 added 2 commits June 29, 2026 13:48
Dedup the JSON-bool accessor chain shared by the new check.fmt/check.lint
reader and lint_config_type_check_enabled into a single json_bool(value, key,
default) helper.
- Update stale check-all-skipped snapshot for the reworded summary line
- Clarify docs: check.fmt/check.lint defaults apply to any vp check run,
  including one invoked from a pre-commit/staged hook
- Note the typeAware prerequisite alongside typeCheck in check.lint guidance
@fengmk2

This comment was marked as resolved.

@fengmk2

fengmk2 commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: de605c5971

ℹ️ 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 docs/config/check.md Outdated
@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Jun 29, 2026
@fengmk2 fengmk2 marked this pull request as ready for review June 29, 2026 06:05
@fengmk2 fengmk2 requested review from TheAlexLichter and cpojer June 29, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants