Closed albcl closed 1 year ago
Thanks for reaching out!
Yes the default settings might be too strict, I admit that and like you also said, they can be fine tuned for personal / team taste so I have spent no time on doing that myself (although I should have, considering how much people get angry about it).
I like the idea, but I see some issues:
I think the idea to show some hint inline is great, and I might get back to this in the future.
As always PR's are more than welcome! :smile:
I have no plans about this, closing.
I see the potential of this extension and how useful it can be. However, maybe it's me, but I find it confusing when it basically complains about pretty much everything... Or maybe that's what I'm having.
I have taken the following sample from this issue just added a
ReactNode
return and undefined as type (to avoid possible complains regarding those) It returnsComplexity is 8 It's time to do something...
and complains about pretty much every line.I appreciate the code lens pointing out what bits should be reconsidered but there is not really an explanation so in some cases it gets difficult to really understand what's the problem and what could be the solution. For example, just telling me
JSX Element <p>{type}</p>
in the image above doesn't really help me understand the problem I'm facing.Neither I get to understand why
Function declaration
orArrow function
are problematic with a 1 on complexity.I know I can change the extension's config to remove the complexity on those cases where I don't think we should get a 1 but that's not exactly my question/issue here.
I just think the explanations should be a bit richer and clearer. For example if I happen to have more than one return it could say
Return statement (single-entry single-exit principle): return <p>{type}</p>
.I hope it makes sense 😅