-
Notifications
You must be signed in to change notification settings - Fork 657
Comments
@ematipico I would like to take this one. |
I don't really understand the rule. The issue title seems like https://eslint.org/docs/latest/rules/no-useless-computed-key. But the fix suggestion is like https://eslint.org/docs/latest/rules/dot-notation. We didn't have both of these rules yet. |
Sorry for the lack of context. In this issue #3731 there's more information about why we decided to split the ESLint rule into three rules. They are more specialised, allowing us to give more control and put them in different groups. |
Naming. How about noComputedLiteralKeys (or MemberNames) or useLiteralKeys? |
I like these names. I wonder if we should narrow down the name to include "string", I don't think the rule will be applied to numerical literals, for example. |
I think it should actually! Any numeric literal should be valid directly as a literal property name (even weird stuff like Boolean and null literals too (trivial) |
👋 @rome/staff please triage this issue by adding one of the following labels: |
this is a super important one, I'd even suggest putting it in the recommended set. It's super dangerous to allow people to accidentally reference a non-literal key due to it sidestepping type checks. |
cc @jeysal
The text was updated successfully, but these errors were encountered: