Skip to content

Add optional support for the CapitalizedCamelCase and CONST_CASE formats #2

Description

@wscourge

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)).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions