Skip to main content

file-name

Restrict feature file names to a common style.

The list of supported styles is:

  • PascalCase: first letter of each word capitalized (no spaces) e.g. "MyFancyFeature.feature"
  • Title Case: first letter of each word capitalized (with spaces) e.g. "My Fancy Feature.feature"
  • camelCase: first letter of each word capitalized, except first e.g. "myFancyFeature.feature"
  • kebab-case: all lowercase, hyphen-delimited e.g. "my-fancy-feature.feature"
  • snake_case: all lowercase, underscore-delimited e.g. "my_fancy_feature.feature"

Configuration

NameTypeDescriptionDefault
stylestringThe name of the desired style (see the list above).PascalCase
allowAcronymsbooleanAllow to use acronyms in capitalized form when using camelCase style.false

Examples

Use Style PascalCase

File names must follow PascalCase pattern.

{
"file-name": [
"error",
{
"style": "PascalCase"
}
]
}

Acronyms on camelCase

If you are using acronyms with the style camelCase and you want to preserve them capitalized, you can set the allowAcronyms property to true:

{
"file-name": [
"error",
{
"style": "camelCase",
"allowAcronyms": true
}
]
}