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
| Name | Type | Description | Default |
|---|---|---|---|
style | string | The name of the desired style (see the list above). | PascalCase |
allowAcronyms | boolean | Allow 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
camelCaseand you want to preserve them capitalized, you can set theallowAcronymsproperty to true:
{
"file-name": [
"error",
{
"style": "camelCase",
"allowAcronyms": true
}
]
}