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

@gapra/vyre-linter

v0.1.0

Published

Linter for Vyre design tokens and skill output. Validates DTCG 2025.10 schema, broken alias refs, WCAG/APCA contrast, and UX rule compliance.

Readme

@gapra/vyre-linter

Linter for Vyre design tokens and skill output. Validates DTCG 2025.10 schema, broken alias references, WCAG/APCA contrast ratios, and UX rule compliance.

Install

npm install -D @gapra/vyre-linter
# or
pnpm add -D @gapra/vyre-linter

CLI

# Run all checks (default)
npx vyre-lint --tokens ./packages/tokens/src --skill ./packages/skill

# Individual checks
npx vyre-lint --dtcg    --tokens <dir>     # DTCG schema validation
npx vyre-lint --refs    --tokens <dir>     # Broken alias references
npx vyre-lint --contrast --tokens <dir>    # WCAG + APCA contrast audit
npx vyre-lint --ux <file>                  # UX rule check on HTML/JSX file

# Options
npx vyre-lint --theme dark                 # light (default) | dark | high-contrast
npx vyre-lint --json                       # Output results as JSON
npx vyre-lint -v                           # Verbose output

Exit codes

| Code | Meaning | |------|---------| | 0 | All checks passed (warnings allowed) | | 1 | One or more errors found |

Programmatic API

import { validateTokenFile } from '@gapra/vyre-linter';
import { validateReferences } from '@gapra/vyre-linter/refs';
import { wcagContrast, apcaLc, parseCssOklch, auditPairs } from '@gapra/vyre-linter/contrast';
import { checkUxRules } from '@gapra/vyre-linter/ux';

validateTokenFile(json, filePath)

Validates a parsed DTCG token file object.

import { validateTokenFile } from '@gapra/vyre-linter';

const json = JSON.parse(await readFile('color.tokens.json', 'utf8'));
const messages = validateTokenFile(json, 'color.tokens.json');
// [{ path, severity: 'error'|'warn', message }]

Rules enforced:

  • $value required on every token node
  • $type must be a known DTCG type (color, dimension, fontFamily, fontWeight, duration, cubicBezier, number, shadow, gradient, typography, border)
  • $value shape validated per type (e.g. color object must have colorSpace + components)
  • No legacy bare value keys (pre-DTCG format)
  • $schema recommended at file root

validateReferences(tokensDir)

Finds broken {alias.ref} references and circular chains across all .tokens.json files in a directory.

import { validateReferences } from '@gapra/vyre-linter/refs';

const messages = await validateReferences('./packages/tokens/src');

auditPairs(pairs, resolveColor)

Audit color pairs against WCAG 2.2 and APCA thresholds.

import { auditPairs, STANDARD_PAIRS } from '@gapra/vyre-linter/contrast';

const results = auditPairs(STANDARD_PAIRS, (name) => cssVars[name]);
// [{ pair, wcag, apca, pass, reason? }]

STANDARD_PAIRS contains the default Vyre token pairs covering body text, buttons, badges, and status surfaces.

checkUxRules(content, filePath)

Validate HTML or JSX source against UX rules.

import { checkUxRules } from '@gapra/vyre-linter/ux';

const violations = checkUxRules(htmlString, 'Component.jsx');
// [{ path, rule, severity: 'error'|'warn', message }]

Rules checked:

  • no-raw-values — no raw hex colors or px spacing in style attributes
  • focus-visible — interactive elements must have :focus-visible styles
  • form-labels / labels-not-placeholders<input> must have <label> or aria-label
  • heading-hierarchy — no skipped heading levels (e.g. h1 → h3)
  • respect-reduced-motion@keyframes must be inside a prefers-reduced-motion guard
  • touch-target-size — buttons must not use size classes smaller than 24px

License

MIT