You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Claude Code often writes oxlint(/oxfmt) config to .oxlintrc.json(/.oxfmtrc.json) instead of vite.config.ts #1031
When using Claude Code (v2.1.78) with the CLAUDE.md generated by vp create (with Claude Code integration selected), Claude Code attempts to write oxlint rule configuration to oxlint.json or .oxlintrc.json instead of vite.config.tslint.rules.
This happens despite the generated CLAUDE.md explicitly stating that Vite+ wraps Oxlint and that tools should not be configured directly.
Environment
Vite+: monorepo setup via vp create
CLAUDE.md: auto-generated (unmodified) with Claude Code option
Claude Code: v2.1.78
Your Suggestion for Changes
I'm not sure if this would fully solve the issue, but it might help to mention in the generated CLAUDE.md that lint(format) configurations should be added to vite.config.ts rather than to standalone oxlint config files.
Relevant Page
No response
Reproduction (Optional)
No response
Steps to reproduce (Optional)
Create a monorepo project with vp create, selecting Claude Code integration
Ask Claude Code to enable an oxlint rule
Claude Code creates .oxlintrc.json at project root instead of adding it to lint.rules in vite.config.ts
I think we could use the if syntax in settings.json to filter this down a bit more so it doesn't run unnecessarily as often, but it should be quite fast. It requires jq to be installed, but the Claude Code hooks docs use it a lot, so ¯_(ツ)_/¯
As a future idea: Once the oxlint plugin (#1408) becomes available, it may be possible to automatically fix this misconfiguration, similar to the approach proposed for IDE configuration files in #1456.
For example, a rule such as vite-plus/no-standalone-oxlint-config could detect standalone configuration files like .oxlintrc.json or oxfmt.config.ts. Then, using --fix, the configuration could be migrated into vite.config.ts and the original files deleted.
In combination with improvements to CLAUDE.md, it would be possible to automatically correct instances where Claude Code accidentally creates these files by running vp check --fix.
Activity
connorshea commentedon Mar 22, 2026
Could potentially add optional Claude Hooks hooks to block Claude from creating the oxfmt/oxlint-specific files?
connorshea commentedon Apr 5, 2026
I put together hooks for this, plus for blocking some commands that vp should be handling (
npm install, etc.) :)https://gist.github.com/connorshea/f2a19e955bcc54e50b33afc7e598bf97
For the config file blocking specifically, you can add these to the repo.
.claude/hooks/enforce-vp-config.shin a repo:And
.claude/settings.jsonto trigger it on writes/edits:{ "$schema": "https://json.schemastore.org/claude-code-settings.json", "hooks": { "PreToolUse": [ { "matcher": "Write|Edit", "hooks": [ { "type": "command", "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/enforce-vp-config.sh", "timeout": 2 } ] } ] } }I think we could use the
ifsyntax in settings.json to filter this down a bit more so it doesn't run unnecessarily as often, but it should be quite fast. It requiresjqto be installed, but the Claude Code hooks docs use it a lot, so ¯_(ツ)_/¯naokihaba commentedon May 12, 2026
As a future idea: Once the oxlint plugin (#1408) becomes available, it may be possible to automatically fix this misconfiguration, similar to the approach proposed for IDE configuration files in #1456.
For example, a rule such as vite-plus/no-standalone-oxlint-config could detect standalone configuration files like .oxlintrc.json or oxfmt.config.ts. Then, using --fix, the configuration could be migrated into vite.config.ts and the original files deleted.
In combination with improvements to CLAUDE.md, it would be possible to automatically correct instances where Claude Code accidentally creates these files by running vp check --fix.