npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@unhead/eslint-plugin

v3.1.0

Published

ESLint rules for catching unhead misuse, type-narrowing issues, and v2-to-v3 migration problems.

Readme

@unhead/eslint-plugin

ESLint rules that catch unhead misuse, type-narrowing issues, and v2-to-v3 migration problems at the source level. Pairs with the runtime ValidatePlugin and the unhead CLI to give you static and runtime coverage of the same rule set.

Install

pnpm add -D @unhead/eslint-plugin eslint

Usage (flat config)

// eslint.config.ts
import { configs } from '@unhead/eslint-plugin'

export default [
  configs.recommended,
]

For projects migrating from unhead v2, swap in configs.migration to also wrap tag literals in the defineLink / defineScript helpers.

Don't want to wire ESLint? @unhead/cli ships the same rules as a standalone command (unhead audit / unhead migrate) running on a native oxc parser — no parser configuration, works out-of-the-box on .ts / .tsx / .vue / .svelte.

Rules

| Rule | Default | Autofix | What it catches | |---|---|---|---| | defer-on-module-script | warn | ✓ | <script type="module" defer> (defer is redundant) | | empty-meta-content | warn | | <meta name="description" content=""> | | no-deprecated-props | error | ✓ | v2 props: children, hid, vmid, body: true | | no-html-in-title | warn | | HTML chars in title (will be escaped, not rendered) | | no-unknown-meta | warn | ✓ | typos in name / property (Levenshtein-suggested fix) | | non-absolute-canonical | warn | | relative URLs in <link rel="canonical"> | | numeric-tag-priority | warn | suggestion | numeric tagPriority (suggests 'critical', 'high', or 'low') | | prefer-define-helpers | off (migration only) | ✓ | wraps link / script tag object literals in defineLink / defineScript | | preload-font-crossorigin | error | ✓ | font preloads missing crossorigin (would refetch) | | preload-missing-as | error | | <link rel="preload"> missing required as | | robots-conflict | error | | index, noindex or follow, nofollow in robots meta | | script-src-with-content | error | | a script with both src and inline content | | twitter-handle-missing-at | warn | ✓ | twitter:site / twitter:creator missing @ | | viewport-user-scalable | warn | | user-scalable=no or maximum-scale=1 (accessibility) |

Coverage

These rules walk source-level calls into the unhead API: useHead, useHeadSafe, useServerHead, useServerHeadSafe, useSeoMeta, useServerSeoMeta, and the tag helpers defineLink / defineScript. Tag arrays inside meta / link / script / noscript / style keys are descended automatically.

Rules can only see what's expressible in the AST. Cross-tag and rendered-output checks (e.g. canonical-og-url-mismatch, meta-beyond-1mb, charset-not-early, too-many-preloads) live in the runtime ValidatePlugin and are surfaced by the unhead validate-url / unhead validate-html CLI commands.

Rule constants

The plugin imports its rule IDs and known-meta sets from unhead/validate, the same module the runtime ValidatePlugin reads. This keeps lint diagnostics, runtime warnings, and CLI reports aligned by construction.