Skip to content

Rule · Lint

No sitemap

lint/missing-sitemapwarnvoid lintupdated

Why it matters

Without a sitemap crawlers discover pages only through links, new or deep pages are indexed slowly and lastmod hints for recrawling are lost.

How to fix it

Add app/sitemap.ts returning every canonical URL with a real lastModified.

Example

ts
import type { MetadataRoute } from 'next'
export default function sitemap(): MetadataRoute.Sitemap {
  return [{ url: 'https://example.com/', lastModified: '2026-09-01' }]
}

References

void lint reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.