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

Add optional support for the CapitalizedCamelCase and CONST_CASE formats #2

Open
6 tasks
wscourge opened this issue Jul 5, 2020 · 0 comments
Open
6 tasks
Labels
enhancement New feature or request

Comments

@wscourge
Copy link
Owner

wscourge commented Jul 5, 2020

The CapitalizedCamelCase and CONST_CASE formats could be supported along camelCase, snake_case and the kebab-case formats. All the formats used should be configurable via the extension's settings.

Acceptance Criteria:

  • Add package.json["contributes"]["configuration"]["properties"]["togglecase.cases"] array with ["kebabCase", "camelCase", "snakeCase"] defaults; those should all be camelCased for consistent naming in extension's functions namespace
  • Add support for differentiating casing by languageId, same as togglecase.pattern
  • Implement reading cases from the configuration - order of cases in their array should define the order of toggling
  • Create an interface with the correctly defined union for all the cases supported
  • CapitalizedCamelCase toggling should not happen for no-case strings, such as for example "email" or "id" (it might upcase them by default)
  • Document the new behavior in the README.md#extension-settings section

For CapitalizedCamelCase, the easy approach is to use _.upperFirst(_.camelCase(value)).

@wscourge wscourge added the enhancement New feature or request label Jul 5, 2020
@wscourge wscourge changed the title Add optional support for the CapitalizedCamelCase format Add optional support for the CapitalizedCamelCase and CONST_CASE formats Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant