-
-
Notifications
You must be signed in to change notification settings - Fork 542
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(lint/useTemplate): preserve leading non-string addition #70
Conversation
2c2560b
to
55b228c
Compare
55b228c
to
200291e
Compare
200291e
to
b6a3bf9
Compare
I don't understand why I got this error on CI. Generating the rule documentation on local doesn't trigger this error (I tried a second time removing first my Note that I added |
That's a generated file; it's inside a biome/xtask/codegen/src/kinds_src.rs Lines 19 to 81 in b53e79c
|
b6a3bf9
to
ae0050b
Compare
ae0050b
to
8f2a1b8
Compare
8f2a1b8
to
846e764
Compare
846e764
to
840c489
Compare
0ef4008
to
840c489
Compare
840c489
to
982ac70
Compare
982ac70
to
350425c
Compare
350425c
to
1d71bc9
Compare
1d71bc9
to
e5a5f8e
Compare
e5a5f8e
to
c2ca25c
Compare
Summary
Fix rome#4713.
Previously, the rule made the following suggestion:
This breaks code where
a
andb
are numbers.This PR fixes the issue making the following suggestion:
I take the opportunity to fix other unnoticed bugs:
The rule also now provides the following suggestion (this aligns our behavior to the eslint behavior):
I also improved the code by avoiding recursions and reduced the number of traversals from 5 to 2.
The code to check if the binary operation is convertible to a template is now complete. This avoids to use memory in the case where the operation is not convertible (the majority of the situations).
Test Plan
New tests added.