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
There are a number of cases where you have a choice between class based syntax and functional syntax. The specific case I'm considering is Enum - though I do vaguely recall that there are other cases.
For example, you defined an enum using either of these methods:
What you prefer is a matter of taste (though honestly, if you prefer functional style, you're a little crazy) - however, I'd like to make sure we prefer the former throughout our codebase at work. This lint could obviously warn in either direction.
I'm a little surprised this suggestion didn't exist before tbh, so feel free to point me to the old ticket if it exists. I did search for "enums" and "functional" to try to find this issue, but I couldn't find it (I also tried a few others queries, but you get the idea).
The text was updated successfully, but these errors were encountered:
There are a number of cases where you have a choice between class based syntax and functional syntax. The specific case I'm considering is Enum - though I do vaguely recall that there are other cases.
For example, you defined an enum using either of these methods:
What you prefer is a matter of taste (though honestly, if you prefer functional style, you're a little crazy) - however, I'd like to make sure we prefer the former throughout our codebase at work. This lint could obviously warn in either direction.
I'm a little surprised this suggestion didn't exist before tbh, so feel free to point me to the old ticket if it exists. I did search for "enums" and "functional" to try to find this issue, but I couldn't find it (I also tried a few others queries, but you get the idea).
The text was updated successfully, but these errors were encountered: