Skip to content

ShipitSmarter/vscode-change-naming-convention

Repository files navigation

Change YAML/JSON naming convention

ChangeNamingConventionTitle ChangeNamingConventionExplorer

This extension enables the quick modification of the naming convention of property keys in YAML or JSON files.

Features

There are 5 new command pallete shortcuts:"

  • Convert to PascalCase
  • Convert to camelCase
  • Convert to snake_case
  • Convert to kebab-case
  • Convert to CONSTANT_CASE

These commands will iterate over every object in the JSON or YAML file and modify the keys to fit the selected case

Settings

There is one configuration option. This can be defined in change-naming-convention in vscode settings (.vscode/settings.json).

{
    "change-naming-convention": {
        "ignoreRegex": ["[A-Z_]*", ".*[0-9]"]
    }
}
id description type default example
ignoreRegex Provide regular expressions for property names that should be ignored during case changing, note: start and end of string notation ^{REGEX}$, will be added automatically string[] [] ["[A-Z_]*", ".*[0-9]"]