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

tokens-lint

v0.1.0

Published

Standalone linting framework for W3C DTCG design token files

Readme

@design-tokens-manager/linter

Standalone linting framework for W3C DTCG design token files.

It is tool-agnostic (no ESLint dependency), ships a small built-in rule pack, and supports custom rules via a plugin-style API.

What You Get

  • Pure linting core (runtime + types)
  • 5 built-in MVP rules
  • CLI with stylish, JSON, and SARIF output
  • Shareable config packages (recommended and strict)
  • Programmatic API for custom rules/plugins

Packages

  • @design-tokens-manager/linter-core: traversal, references, runtime, shared types
  • @design-tokens-manager/linter-rules: built-in rule pack (MVP)
  • @design-tokens-manager/linter-cli: CLI + config loading + formatters
  • @design-tokens-manager/linter-config-recommended: baseline shared config
  • @design-tokens-manager/linter-config-strict: stricter shared config

See package-level docs:

Quick Start

Prerequisite: pnpm

pnpm install
pnpm build
pnpm test:rules

Use It Programmatically

import { createLinter } from '@design-tokens-manager/linter-core';
import { allRules } from '@design-tokens-manager/linter-rules';

const linter = createLinter(allRules);

const result = linter.lint(tokens, {
  rules: {
    'core/valid-dtcg': 'error',
    'core/required-type': 'error',
    'naming/convention': ['warn', { case: 'kebab-case' }],
  },
});

console.log(result.errorCount, result.warningCount);

Use It From The CLI

Example config:

// tokens.lint.config.js
export default {
  rules: {
    'core/valid-dtcg': 'error',
    'core/no-unresolved-refs': 'error',
    'core/no-circular-refs': 'error',
    'naming/convention': ['warn', { case: 'kebab-case' }],
  },
};

Run:

pnpm lint:tokens "tokens/**/*.json"

Common options:

pnpm lint:tokens -f json "tokens/**/*.json"
pnpm lint:tokens -f sarif "tokens/**/*.json"
pnpm lint:tokens -c ./tokens.lint.config.js "tokens/**/*.json"
pnpm lint:tokens --output ./lint-report.txt "tokens/**/*.json"

When using --output, the report is written to that file and a confirmation is printed.

Built-in Rules (MVP)

Core:

  • core/valid-dtcg
  • core/required-type
  • core/no-unresolved-refs
  • core/no-circular-refs

Naming:

  • naming/convention

Rule details and examples: RULES.md

Config Presets

Recommended:

import recommended from '@design-tokens-manager/linter-config-recommended';

export default {
  rules: {
    ...recommended.rules,
  },
};

Strict:

import recommended from '@design-tokens-manager/linter-config-recommended';
import strict from '@design-tokens-manager/linter-config-strict';

export default {
  rules: {
    ...recommended.rules,
    ...strict.rules,
  },
};

Why manual merging? shareable-config extends is not auto-resolved by the CLI yet.

Runnable examples: examples/README.md

Plugin Architecture

You can add custom rules using the core API. For a working example, see examples/plugin-example.mjs.

Testing

pnpm test
pnpm test:rules
pnpm test -- --grep "naming"

CLI Output And Exit Codes

Output formats:

  • stylish
  • json
  • sarif

Exit codes:

  • 0: no errors
  • 1: lint completed with at least one error
  • 2: invalid invocation, unsupported format, or no files matched

Project Status

Active and stable for the MVP rule set.

The shared config type currently includes fields such as extends, plugins, ignorePatterns, and overrides, but runtime merge/resolve behavior for those fields is not fully implemented yet. rules is the primary active configuration input today.

Roadmap for additional rules: WHATS-NEXT.md

Contributing

See:

License

MIT. See LICENSE.

Acknowledgments