fix(noCommaOperator): remove vue v-for hack#10137
Conversation
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2819409 to
ba1d8ea
Compare
5112891 to
19c5acd
Compare
WalkthroughThis change removes the special case handling that prevented the Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/biome_js_analyze/src/lint/complexity/no_comma_operator.rs (1)
57-71:⚠️ Potential issue | 🟠 MajorPlease add regression snapshots for the Vue
v-forfalse-positive path.This changes lint behaviour in template expressions, but the PR does not include rule snapshots validating the fix and guarding against regressions. Please add tests that (at minimum) cover Vue
v-foraliases and a true comma-operator violation in template context.As per coding guidelines
**/*.{rs,ts,tsx,js}: “All code changes MUST include appropriate tests … and bug fixes require tests that reproduce and validate the fix.”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/biome_js_analyze/src/lint/complexity/no_comma_operator.rs` around lines 57 - 71, Add regression snapshot tests for the no_comma_operator rule to cover the Vue v-for false-positive and a real comma-operator violation inside template expressions: add test cases exercising the rule's run function (the logic using ctx.query() / seq and the JsSequenceExpression / JsForStatement parent checks) that include a Vue v-for alias pattern (e.g., template expression with comma-separated aliases) which should not trigger, and a template expression that legitimately uses the comma operator which should trigger; create snapshots for both cases using the rule test harness so future changes to run() will be guarded against regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@crates/biome_js_analyze/src/lint/complexity/no_comma_operator.rs`:
- Around line 57-71: Add regression snapshot tests for the no_comma_operator
rule to cover the Vue v-for false-positive and a real comma-operator violation
inside template expressions: add test cases exercising the rule's run function
(the logic using ctx.query() / seq and the JsSequenceExpression / JsForStatement
parent checks) that include a Vue v-for alias pattern (e.g., template expression
with comma-separated aliases) which should not trigger, and a template
expression that legitimately uses the comma operator which should trigger;
create snapshots for both cases using the rule test harness so future changes to
run() will be guarded against regressions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bf587559-436d-4ff9-ae6d-6b1bef704f2f
📒 Files selected for processing (1)
crates/biome_js_analyze/src/lint/complexity/no_comma_operator.rs
Merging this PR will not alter performance
Comparing Footnotes
|

Summary
follow up to #8620
closes #9075
Test Plan
Docs