-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
Rule proposal: prefer-object-define-properties
#1729
Comments
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 |
prefer-object-defineProperties
prefer-object-define-properties
Another reason to reject this rule, it would interact poorly with microsoft/TypeScript#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 |
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
The text was updated successfully, but these errors were encountered: