-
-
Notifications
You must be signed in to change notification settings - Fork 645
fix(biome-js-analyze): add a check for if/ else and ternary operators… #6524
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(biome-js-analyze): add a check for if/ else and ternary operators… #6524
Conversation
🦋 Changeset detectedLatest commit: 7ac70fa 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 |
crates/biome_js_analyze/src/lint/nursery/use_readonly_class_properties.rs
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_readonly_class_properties.rs
Outdated
Show resolved
Hide resolved
CodSpeed Performance ReportMerging #6524 will not alter performanceComparing Summary
|
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.
I left some questions around the code, to have more clarity. Also left some comments around the changeset
crates/biome_js_analyze/src/lint/nursery/use_readonly_class_properties.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_readonly_class_properties.rs
Outdated
Show resolved
Hide resolved
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.
Thank you! 👏
4eb012c
to
62e0a7b
Compare
62e0a7b
to
aece21b
Compare
… in fn body for class member prop mutations
dfc5c45
to
7ac70fa
Compare
Yeah great! That works, I tested it on my code :-) Thanks @vladimir-ivanov for that fast fix! |
Summary
Fixed an issue where class properties that are set in the constructor were not being marked as
readonly
when theyshould be if found in if/ else condition.
Example:
closes #6500