fix(noCommaOperator): disable rule in vue template expressions#9074
fix(noCommaOperator): disable rule in vue template expressions#9074
Conversation
|
Merging this PR will not alter performance
Comparing Footnotes
|
WalkthroughAdds an ignore rule for Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
| } | ||
| } | ||
|
|
||
| // HACK: Skip in Vue template expressions (e.g., v-for="(item, index) in items") |
There was a problem hiding this comment.
Could you add the issue here too, so we can quickly identify the hack to remove?
76a2580 to
f725ae3
Compare
Summary
This PR is a hack that disables the
noCommaOperatorrule specifically in template expressions in vue files. The reason I chose to do this hack instead of the real fix (#8062) is because its a bit complicated, and I don't want this issue to block the 2.4 release. I also know that this specificv-forsyntax is rather common. My test codebase had 14 false positives, despite it being relatively small compared to an enterprise codebase.I've opened a new issue as a follow up task to remove this hack when v-for is parsed better. #9075
Generated by kimi k2.5. No changeset because the affected behavior has not been released yet.
fixes #9069
Test Plan
Added 2 cli tests to show this only affects vue files. The tests will remain valid after the hack is removed.
Docs