Rename category enums from snake_case to kebab-case#116
Conversation
🦋 Changeset detectedLatest commit: e80622a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Code Review
This pull request renames the Category enum values from snake_case to kebab-case and adds a corresponding changeset for a major version bump. A review comment points out that this change introduces inconsistency with other enums in the same file, such as CommonMetaIds, and suggests either expanding the refactor to include those enums or reverting the change to maintain a uniform naming convention.
| "projects-and-protocols", | ||
| "organizations", | ||
| "cryptoassets", | ||
| "exchanges_and_marketplaces", | ||
| "exchanges-and-marketplaces", |
There was a problem hiding this comment.
While the intent to use kebab-case is clear, this change introduces an inconsistency with other string enums in this file. For instance, CommonMetaIds consistently uses snake_case for multi-word values (e.g., contract_url, facebook_profile). The EditSpecificMetaIds enum is also inconsistent, with both snake_case and kebab-case values.
To improve overall consistency, I recommend one of two approaches:
- Expand this PR to convert other similar enums (like
CommonMetaIds) tokebab-case. Since this is already a major breaking change, it's a good opportunity to bundle these related changes. - If a broader change is not feasible, consider reverting this change to maintain consistency with the prevalent
snake_casestyle.
A consistent naming convention is crucial for long-term maintainability.
| "projects-and-protocols", | |
| "organizations", | |
| "cryptoassets", | |
| "exchanges_and_marketplaces", | |
| "exchanges-and-marketplaces", | |
| "projects_and_protocols", | |
| "organizations", | |
| "cryptoassets", | |
| "exchanges_and_marketplaces", |
References
- Adhering to a consistent naming convention for identifiers like enum members improves code readability and maintainability, reducing cognitive load for developers.
Summary
projects_and_protocols→projects-and-protocolsexchanges_and_marketplaces→exchanges-and-marketplacesTest plan