Skip to content
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

Enforce consistent enum usage #34

Closed
mrmckeb opened this issue Aug 5, 2022 · 2 comments
Closed

Enforce consistent enum usage #34

mrmckeb opened this issue Aug 5, 2022 · 2 comments

Comments

@mrmckeb
Copy link
Contributor

mrmckeb commented Aug 5, 2022

We see people setting enum keys in const-style sometimes, but would prefer to standardise around the approach used in docs.

This can be set via: https://typescript-eslint.io/rules/naming-convention

Incorrect

enum Colors {
  RED = 'rgb(255, 0, 0)',
  NOT_RED = 'rgb(0, 255, 255)',
}

enum COLORS { /* ... */ }

Correct

enum Colors {
  Red = 'rgb(255, 0, 0)',
  NotRed = 'rgb(0, 255, 255)',
}

See:

@mrmckeb mrmckeb added the eslint label Aug 5, 2022
@mrmckeb mrmckeb added this to the September 2022 milestone Sep 21, 2022
mrmckeb added a commit that referenced this issue Sep 21, 2022
mrmckeb added a commit that referenced this issue Sep 21, 2022
mrmckeb added a commit that referenced this issue Sep 21, 2022
mrmckeb added a commit that referenced this issue Sep 21, 2022
@vercel-release-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.0.0-canary.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@vercel-release-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants