You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2021. It is now read-only.
😄 that didn't take long! Yes, this seems reasonable as a TSLint rule. The above code results in { '0': 1, '1': 2, '2': 3 }, which could be surprising. Let's see if anybody else has suggestions or opposing thoughts.
Note: per #4534, this issue will be closed in less than a month if no PR is sent to add the rule. If you really need the rule, custom rules are always an option and can be maintained outside this repo!
Rule Suggestion
Is your rule for a general problem or is it specific to your development style?
I think it's a general problem. I have buy in from one other person on twitter, so surely it's ubiquitous, right? https://twitter.com/jamesadams0/status/1069845022722277376
What does your suggested rule do?
Warns when you attempt to spread an array into an object.
List several examples where your rule could be used
Additional context
Playground: http://www.typescriptlang.org/play/#src=const%20a%20%3D%20%5B1%2C%202%2C%203%5D%0A%0Aconst%20b%20%3D%20%7B%20...a%20%7D%0A
The text was updated successfully, but these errors were encountered: