feat(biome_js_analyze): adds new lint rule useReadonlyClassProperties#6297
Conversation
e85d341 to
34afc91
Compare
CodSpeed Performance ReportMerging #6297 will not alter performanceComparing Summary
|
2cb99b6 to
420d2b3
Compare
|
any ideas on what to do about performance please? does it need addressing to start with? |
44d7dc0 to
7b0dce7
Compare
|
We recently changed the way we do benchmarks (sharding), so the benchmarks we ignored before need to be ignored again, unfortunately. That's one of them. TLDR: no need to address the benchmark |
7b0dce7 to
c40ead4
Compare
ematipico
left a comment
There was a problem hiding this comment.
Thank you @vladimir-ivanov, I left some suggestions. There's a bit of rework to do, so please take your time to address the suggestions. Mainly, here's the important things to address:
- Documentation: let's follow the same format we use everywhere. Use other rules to check how we do it
- Doc comments: please document all internal functions, explaining what they do. Since this is a shared code base, we want to make sure to document as much know-how that we can, so the next developer won't have hard time understanding things
- Tests: let's borrow the test suite from the eslint rule
- Strong typed coding: let's avoid returning
SyntaxNodes, and let's try to use a stricter approach, it will make the code more readable, safer and easier to use.
c628c77 to
d2440e8
Compare
f7c4d03 to
f4b89e4
Compare
b0b1c8c to
e0e1925
Compare
|
need to remove the unwrap() usages in fact, please bare with me a couple of hours |
e0e1925 to
8c9c1ef
Compare
|
I think the benchmarks message is the result of a bad commit, or merge resolution. In fact, there are now 333 files changed. |
fd4435f to
f590ac2
Compare
|
@ematipico @Conaclos please resume the review, all covered now, no more unwrap() etc. many thanks |
hope everything is covered now here, but please shout if I missed anything |
ematipico
left a comment
There was a problem hiding this comment.
Thank you @vladimir-ivanov. There's a comment that hasn't been addressed, I tagged you in it.
The implementation of the rule has become big. In such cases, we ask the contributors to use the PR description to explain the implementation of the code, which helps reviewers to assimilate an overview of the algorithm and how to review the PR.
There's a regression in our benchmarks, so we should take a look at it if possible.
please check the description at the top of this pr, and also added more details per fn description. Hope it is a bit more intuitive now? if not, please let me know, will add more :_0 |
|
@ematipico hope we are close to where we should be, please re check and answer my questions? |
🦋 Changeset detectedLatest commit: aaf0bfd The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 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 |
There was a problem hiding this comment.
Thank you @vladimir-ivanov ! I know it was a lot of work, but I hope you had fun and learned a bit more about how Biome works. (CI is failing)
yep, this was my graduation pr :-). Now I feel a bit more confident with what I am doing and can actually think about making things better too. many thanks for your help. And please merge once the build goes green? had a small issue with Empasis tag |
|
can we merge this pr please? |
Summary
Adds a new lint
useReadonlyClassPropertiesrule.This rule implements ESLint's prefer-readonly rule.
Example:
closes #4356