Skip to main content

require-vitepress-title-or-titletemplate

Require at least one of title or titleTemplate in committed VitePress config.

Rule catalog ID: R066

Targeted pattern scopeโ€‹

  • .vitepress/config.*
  • title
  • titleTemplate

What this rule reportsโ€‹

This rule reports VitePress config files that define neither title nor titleTemplate.

Why this rule existsโ€‹

Explicit title metadata improves predictable branding and social preview behavior. Requiring one of these fields helps avoid accidental anonymous site headers.

โŒ Incorrectโ€‹

import { defineConfig } from "vitepress";

export default defineConfig({
description: "Project docs",
});

โœ… Correctโ€‹

import { defineConfig } from "vitepress";

export default defineConfig({
title: "Project Docs",
});

Behavior and migration notesโ€‹

  • this rule only applies to .vitepress/config.*
  • either key satisfies the rule

ESLint flat config exampleโ€‹

import vite from "@typpi/eslint-plugin-vite";

export default [vite.configs.vitepress];

When not to use itโ€‹

Disable this rule only if title metadata is intentionally injected elsewhere and omitted from VitePress config.

Package documentationโ€‹

Further readingโ€‹