Open Pyrolistical opened 2 years ago
If there are many descriptors, normally it's a loop, if there are not many descriptors, I don't think they make much difference. But I'm fine adding this rule, just don't think it have much value.
If we decide to add this rule, we should also check Reflect.defineProperty
Another reason to reject this rule, it would interact poorly with https://github.com/microsoft/TypeScript/issues/41424
Another reason to reject this rule, it would interact poorly with https://github.com/microsoft/TypeScript/issues/41424
This plugin targets JavaScript. TypeScript weaknesses is not a concern. TypeScript users can just disable this rule.
I think if this is going to be useful, it needs an auto-fix. Manually converting to Object.defineProperties
would not be worth the effort.
Accepted
Description
I didn't know
Object.defineProperties
existed. Would have been nice for a rule to teach me as I wrote consecutiveObject.defineProperty
.Fail
Pass