Skip to content

jsonc/key-name-casing

enforce naming convention to property key names

📖 Rule Details

This rule enforces a naming convention to property key names.

Now loading...

🔧 Options

json5
{
    "jsonc/key-name-casing": ["error",
        {
            "camelCase": true,
            "PascalCase": false,
            "SCREAMING_SNAKE_CASE": false,
            "kebab-case": false,
            "snake_case": false,
            "ignores": []
        }
    ]
}
  • "camelCase" ... if true, allows camelCase naming. default true
  • "PascalCase" ... if true, allows PascalCase naming. default false
  • "SCREAMING_SNAKE_CASE" ... if true, allows SCREAMING_SNAKE_CASE naming. default false
  • "kebab-case" ... if true, allows kebab-case naming. default false
  • "snake_case" ... if true, allows snake_case naming. default false
  • "ignores" ... you can specify the patterns to ignore in the array.

🚀 Version

This rule was introduced in eslint-plugin-jsonc v0.8.0

🔍 Implementation