-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enum naming convention? #22
Comments
I use pascal case to name the enum itself and upper case to define its constants, an example would be: export enum CandleSize {
ONE_MINUTE = 1,
FIVE_MINUTES = 5,
} |
like @jakagacic wrote, PascalCase for name without |
What about vanilla JS, non TS? Is this the equivalent?
|
My preference is to go with PascalCase like suggested in the docs enum Direction {
Up = "UP",
Down = "DOWN",
Left = "LEFT",
Right = "RIGHT",
} but seeing that the majority likes uppercase SNAKE_CASE, why not. Linter doesnt support checking for this (without a plugin), so lets just write it in the docs |
How do you write enums and on what should we all agree?
The text was updated successfully, but these errors were encountered: