vitest/prefer-lowercase-title
March 1, 2026 ยท View on GitHub
๐ Enforce lowercase titles.
โ ๏ธ This rule warns in the ๐ all config.
๐ง This rule is automatically fixable by the --fix CLI option.
Rule Details
Examples of incorrect code for this rule:
test('It works', () => {
// ...
})
Examples of correct code for this rule:
test('it works', () => {
// ...
})
Options
| Name | Description | Type |
|---|---|---|
allowedPrefixes | Title prefixes that are exempt from this rule. | String[] |
ignore | Functions whose titles should be ignored when checking case. | String[] |
ignoreTopLevelDescribe | Ignore the first top-level describe title. | Boolean |
lowercaseFirstCharacterOnly | Only require the first character to be lowercase. | Boolean |
{
"type": "object",
"properties": {
"ignore": {
"type": "array",
"items": {
"enum": ["describe", "test", "it"]
},
"additionalProperties": false
},
"allowedPrefixes": {
"type": "array",
"items": {
"type": "string"
},
"additionalItems": false
},
"ignoreTopLevelDescribe": {
"type": "boolean",
"default": false
},
"lowercaseFirstCharacterOnly": {
"type": "boolean",
"default": true
}
},
"additionalProperties": false
}