-
-
Couldn't load subscription status.
- Fork 732
fix(useNamingConvention): don't panic on $ name #7825
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
fix(useNamingConvention): don't panic on $ name #7825
Conversation
🦋 Changeset detectedLatest commit: d3185f7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis patch release addresses a panic in the useNamingConvention linter rule. The fix prevents the tool from crashing when it encounters a single dollar sign ("$") identifier that does not match custom naming conventions. Changes include guard logic to skip empty computed names during renaming operations, alongside new test cases documenting the edge case behaviour. Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (5)crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
crates/biome_*/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.rs📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/tests/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
.changeset/*.md📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-10-15T09:20:19.139ZApplied to files:
🧬 Code graph analysis (1)crates/biome_js_analyze/src/lint/style/use_naming_convention.rs (1)
⏰ 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). (10)
🔇 Additional comments (4)
Comment |
CodSpeed Performance ReportMerging #7825 will not alter performanceComparing Summary
Footnotes
|
Summary
Fix #7798
The panic occurs when the rule tries to convert
$in a name that matches the custom conventions. The conversion results in an empty string that in turn produces an invalid parse tree.The fix is pretty simple: we check if the name is empty before applying the fix.
Test Plan
I added a non-regression test.
Docs
I added a change set.