Skip to content

Latest commit

 

History

History
71 lines (57 loc) · 1.78 KB

File metadata and controls

71 lines (57 loc) · 1.78 KB

vitest/prefer-lowercase-title

📝 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
}