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

NameDescriptionType
allowedPrefixesTitle prefixes that are exempt from this rule.String[]
ignoreFunctions whose titles should be ignored when checking case.String[]
ignoreTopLevelDescribeIgnore the first top-level describe title.Boolean
lowercaseFirstCharacterOnlyOnly 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
}