Skip to content

Rename category enums from snake_case to kebab-case#116

Merged
invisiblemask merged 1 commit intomainfrom
rename-category-enums-to-kebab-case
Apr 2, 2026
Merged

Rename category enums from snake_case to kebab-case#116
invisiblemask merged 1 commit intomainfrom
rename-category-enums-to-kebab-case

Conversation

@invisiblemask
Copy link
Copy Markdown
Contributor

Summary

  • Renames projects_and_protocolsprojects-and-protocols
  • Renames exchanges_and_marketplacesexchanges-and-marketplaces
  • Includes major changeset since this is a breaking change

Test plan

  • Build passes
  • Tests pass

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 2, 2026

🦋 Changeset detected

Latest commit: e80622a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@everipedia/iq-utils Major

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

@invisiblemask invisiblemask merged commit c450104 into main Apr 2, 2026
1 check passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +182 to +185
"projects-and-protocols",
"organizations",
"cryptoassets",
"exchanges_and_marketplaces",
"exchanges-and-marketplaces",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:

  1. Expand this PR to convert other similar enums (like CommonMetaIds) to kebab-case. Since this is already a major breaking change, it's a good opportunity to bundle these related changes.
  2. If a broader change is not feasible, consider reverting this change to maintain consistency with the prevalent snake_case style.

A consistent naming convention is crucial for long-term maintainability.

Suggested change
"projects-and-protocols",
"organizations",
"cryptoassets",
"exchanges_and_marketplaces",
"exchanges-and-marketplaces",
"projects_and_protocols",
"organizations",
"cryptoassets",
"exchanges_and_marketplaces",
References
  1. Adhering to a consistent naming convention for identifiers like enum members improves code readability and maintainability, reducing cognitive load for developers.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant