-
-
Notifications
You must be signed in to change notification settings - Fork 69
releasing: next patch version v1.7.4 #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for vue-vine ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughAdded defensive guards to an ESLint rule fixer to avoid errors when HTML start/end tags are missing; pinned three pnpm workspace anchors from tilde ranges to exact versions; and gated ts-morph hot-update work in the Vite plugin to only run for TypeScript-like files. Changes
Sequence Diagram(s)sequenceDiagram
participant ESLint as ESLint Engine
participant Rule as format-html-self-closing Rule
participant Fixer as Fix Function
ESLint->>Rule: Visit HTML node
Rule->>Fixer: Request fixes
Fixer->>Fixer: Check startTag/endTag present?
alt Missing tag
Fixer-->>Rule: Return []
else Both present
Fixer->>Fixer: Replace '>' with '/>'
Fixer->>Fixer: Remove endTag range
Fixer-->>Rule: Return fixes
end
sequenceDiagram
participant Vite as Vite HMR
participant Plugin as vite-plugin.handleHotUpdate
participant tsMorph as ts-morph cache/workflow
Vite->>Plugin: File changed (ctx.file)
Plugin->>Plugin: Test isTsFileRegex && tsMorphCache
alt Not TS-like OR no tsMorphCache
Plugin-->>Vite: Skip ts-morph update
else TS-like && tsMorphCache
Plugin->>tsMorph: Ensure project/source file entry
tsMorph->>tsMorph: Update or replace source file content
tsMorph-->>Plugin: Updated
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
@vue-vine/compiler
create-vue-vine
@vue-vine/eslint-config
@vue-vine/eslint-parser
@vue-vine/eslint-plugin
@vue-vine/language-server
@vue-vine/language-service
@vue-vine/nuxt
vue-vine-tsc
@vue-vine/vite-plugin
vue-vine
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
packages/eslint-plugin/src/rules/format/format-html-self-closing.ts (4)
154-165
: Prefer range-based fixes to avoid type casts and fragile string replacementCurrent approach forces casting to TSESTree.Node and uses string replace on the entire startTag, which can inadvertently replace a '>' inside an attribute value. You can avoid both by using range-based fixes for the last '>' in the start tag.
Apply this diff:
- const startTag = node.startTag as any as (TSESTree.Node | undefined) - const endTag = node.endTag as any as (TSESTree.Node | undefined) + const startTag = node.startTag + const endTag = node.endTag if (!startTag || !endTag) { return [] } - return [ - // Replace '>' of startTag with '/>' - fixer.replaceText(startTag, context.sourceCode.getText(startTag).replace('>', '/>')), - // Remove the text from the end of startTag to the end of endTag - fixer.removeRange([startTag.range[1], endTag.range[1]]), - ] + // Replace the last '>' of the start tag with '/>' + const gt = startTag.range[1] - 1 + return [ + fixer.replaceTextRange([gt, gt + 1], '/>'), + // Remove the text from the end of startTag to the end of endTag + fixer.removeRange([startTag.range[1], endTag.range[1]]), + ]
131-133
: Tighten types: avoid optional chaining for options
createEslintRule
suppliesdefaultOptions
, socontext.options[0]
should always exist. Dropping?.
improves type safety and avoids unnecessaryOption | undefined
union types.- const options = context.options?.[0] + const options = context.options[0]
24-34
: Fix minor typo in commentTypo: “wil” → “will”.
- * These strings wil be displayed in error messages. + * These strings will be displayed in error messages.
153-166
: Consider adding tests for malformed/missing endTag casesNow that the fixer defensively no-ops when tags are missing, add RuleTester cases to assert:
- It reports but does not crash when endTag is missing.
- It produces no fixes (empty fix array) in that scenario.
I can draft the test cases if helpful.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/eslint-plugin/src/rules/format/format-html-self-closing.ts
(1 hunks)pnpm-workspace.yaml
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-17T14:54:18.385Z
Learnt from: ShenQingchuan
PR: vue-vine/vue-vine#283
File: packages/vscode-ext/package.json:105-110
Timestamp: 2025-06-17T14:54:18.385Z
Learning: The Vue Vine VSCode extension uses tsdown as a bundler that statically analyzes and includes all imported dependencies in the final bundle, regardless of whether they are listed in dependencies or devDependencies in packages/vscode-ext/package.json. Runtime dependencies can safely be placed in devDependencies since they will be bundled into the extension output.
Applied to files:
pnpm-workspace.yaml
🧬 Code Graph Analysis (1)
packages/eslint-plugin/src/rules/format/format-html-self-closing.ts (1)
packages/eslint-parser/src/ast/nodes.ts (1)
Node
(22-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: e2e_tests (hmr, macos-latest)
- GitHub Check: e2e_tests (hmr, windows-latest)
- GitHub Check: e2e_tests (basic, windows-latest)
- GitHub Check: e2e_tests (hmr, ubuntu-latest)
- GitHub Check: unit_tests (lts/*, windows-latest)
🔇 Additional comments (2)
pnpm-workspace.yaml (1)
7-9
: Pinning anchors to exact versions improves determinismSwitching from tilde ranges to exact pins for &vue-lang-tools, &volar, and &volar-service tightens reproducibility across the workspace. Good call for patch release stability.
packages/eslint-plugin/src/rules/format/format-html-self-closing.ts (1)
154-159
: Good defensive guard to prevent fixer crashes on malformed nodesEarly-returning when startTag or endTag is missing avoids unsafe fixer execution and aligns with the PR goal to prevent runtime panics. LGTM.
@coderabbitai summary |
✅ Actions performedSummary regeneration triggered. |
Summary by CodeRabbit
Bug Fixes
Chores
Developer Experience