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

@agencypmg/design-lint

v0.0.9

Published

Flags code that bypasses the Alli design system and scores how much an app is breaking the system

Maintainers

psmith22psmith22chrisguitarguychrisguitarguychrisalvareschrisalvarespmgbotpmgbotemilysnothereemilysnothereeawooteneawootenandrethioandrethioshinghim-pmgshinghim-pmgphildierphildierbecconkbecconksiephensiephenbriannagaskillbriannagaskillian-evidenteian-evidenteandrewgazdaandrewgazdatomasxtomasxgoodmaingoodmaintalinhalltalinhallniclee521niclee521shlokkhetanshlokkhetanharshithamandruharshithamandrushuluushuluujgmpmgjgmpmgrebeccakingryrebeccakingrykeerthi_kamarthikeerthi_kamarthiyashodharayashodharaaliciazavalaaliciazavalaadamdutton08adamdutton08jrughanijrughanitani-shahtani-shahsatishnssatishnsbbarnoldbbarnoldjay-andersonjay-andersonmelvyn1497melvyn1497gautamsharmavgautamsharmavsean_goodchildsean_goodchildcolinpmgcolinpmgzaaim.rzaaim.romarassaf106omarassaf106jenajenatheantpiletheantpilescotthenleyscotthenleyethankarpelesethankarpelesjimfurnierpmgjimfurnierpmgadityachaudhari1412adityachaudhari1412katthartickattharticjoshuajohnsjoshuajohnstristand0703tristand0703kendrick-mcadamskendrick-mcadamsnoahwebbernoahwebberjess-kizerjess-kizerjoshua.dienyejoshua.dienyekcielenckikcielenckiaayush1999aayush1999mohdali236mohdali236leovogel_pmgleovogel_pmgdatamadeeezydatamadeeezycaleb.welchcaleb.welchedwardpmgedwardpmglawirmuhammedlawirmuhammedwilliamng822williamng822sairashe001sairashe001bliuhbliuhjordanrusselljordanrussellbquach1bquach1adiv24adiv24artem.polupan.pmgartem.polupan.pmgevistnesevistnesjkole971jkole971spencer-reynosospencer-reynosobrycedev-pmgbrycedev-pmgramprasad.koyaramprasad.koyanswopepmgnswopepmgjohn.tunisonjohn.tunisonmarlonmiguelpmgmarlonmiguelpmgvatsal.nayakvatsal.nayakbillhuertasbillhuertastdumont-pmgtdumont-pmgcooperunpmgcooperunpmgjaiden.ritterjaiden.ritterbhavana.tripuranenibhavana.tripuranenihunter-merrillhunter-merrillsamuelgoodellpmgsamuelgoodellpmgronvelronveljosephdabkowskijosephdabkowskieffmenzieseffmenziessteven_zsteven_zmilesrosoffmilesrosoffphildesro123phildesro123landon.princelandon.princessajanlalssajanlalannieatpmgannieatpmgliammoran04liammoran04diane.parkdiane.parkrhysjackson_pmgrhysjackson_pmgnabhanabhaserenadimartinoserenadimartinobrentruppi-pmgbrentruppi-pmggriffindeckergriffindeckeraliciayualiciayusriram.basavarajusriram.basavarajujustinhaddadjustinhaddadaaron_xu92aaron_xu92xinyu.liangxinyu.liangzantuaw_pmgzantuaw_pmgantonio.salinas.pmgantonio.salinas.pmgarthur-woodsarthur-woodsedgarmacias-opsedgarmacias-opsana.knutsonana.knutsonjzpmgjzpmgpremrasakondapremrasakondadong.nguyendong.nguyenketanpmgketanpmgjustin.najustin.natyler-gregorytyler-gregorymiketreon-devmiketreon-devadam.hamdanadam.hamdanericelskenpmgericelskenpmgjohnforstmeierpmgjohnforstmeierpmgasreedy82asreedy82pmg-sevenonethreepmg-sevenonethreecadebauercadebauerjohnathan.rodriguezjohnathan.rodriguezandypmgandypmghuanyangpmghuanyangpmgleoblanchardleoblanchardnoesanchez17noesanchez17calebfordcalebfordanjalisingh17anjalisingh17joannayi3joannayi3ashleycardotashleycardottyler-nelsontyler-nelsonzoekle424zoekle424randyyyrandyyytharunrtharunrcschafer103cschafer103nathanpmgnathanpmgmichellsickingpmgmichellsickingpmgdleveredleveresaivaka19saivaka19

Keywords

designlint

Readme

@agencypmg/design-lint

Flags code that bypasses the Alli design system and scores how much an app is breaking the system.

It statically scans an app's .ts, .tsx, .js, .jsx, .css, .scss and .less files for patterns that couple to design-system internals or sidestep its tokens and scales, then reports an adherence score from 0 to 100 (100 = clean).

Requires Node >= 18.

Usage

# Report adherence score(s) for one or more apps
npx @agencypmg/design-lint report apps/my-app

# Fail on any violation
npx @agencypmg/design-lint check apps/my-app

# List all rules
npx @agencypmg/design-lint --rules

The command defaults to report if omitted.

Commands

| Command | Behavior | | -------- | ---------------------------------------------------------------------------------------------------------------- | | report | Prints adherence score(s). Exits 0 unless --fail-under is set. | | check | Exits 1 on any violation, on new violations vs --baseline, or on violations in changed lines with --diff. |

Options

| Option | Description | | ----------------------- | --------------------------------------------------------------------------------------------------------------- | | --config <file> | JSON config file (default: ./design-lint.config.json). See Configuration. | | --baseline <file> | Only fail on violations not present in the baseline. | | --update-baseline | Write the baseline file from the current state (use with --baseline). | | --diff <base-ref> | Only violations on lines changed vs the merge-base with <base-ref> are blocking. Run inside the app's git repo. | | --fail-under <score> | Exit 1 if any app scores below this. | | --format <fmt> | text (default), json, md, or github (inline PR annotations for blocking violations). | | --path-prefix <p> | Prefix for annotation file paths when the app is checked out in a subfolder. | | --comment-file <file> | With --diff: write the PR-comment markdown to <file>: the violations table, or a short "resolved" note when the PR adds none. Line 1 is always the hidden COMMENT_MARKER. | | --head-sha <sha> | Commit that comment links point to (the PR head). Defaults to GITHUB_SHA, which is the merge commit on pull_request. | | --color / --no-color| Force or disable ANSI colors. Defaults to TTY detection; honors NO_COLOR / FORCE_COLOR. | | --verbose | Show detail for every app, not just a single one. | | --rules | List rules and exit. |

Rules

Rules are split into two tiers. Tier 1 is reaching into the system (coupling to internals, overriding specificity). Tier 2 is bypassing the system's tokens and scales. Weights feed the score.

| Rule | Tier | Weight | What it flags | | ------------------------ | ---- | ------ | ----------------------------------------------------------------------- | | reaches-into-internals | 1 | 15 | Selectors targeting .alli-* classes, data-testid or data-*. | | alli-class | 1 | 15 | Using an alli-* class directly. | | style-element | 1 | 10 | <style> elements. | | important | 1 | 5 | !important. | | arbitrary-selector | 1 | 5 | Arbitrary Tailwind selectors/variants, e.g. [&_div]:p-2. | | raw-css-file | 2 | 8 | Raw CSS files (files with only @tailwind/@import/@config are OK). | | arbitrary-color | 2 | 4 | Arbitrary Tailwind colors, e.g. text-[#f00]. | | hardcoded-color | 2 | 3 | Hardcoded colors in inline styles. | | arbitrary-value | 2 | 2 | Arbitrary Tailwind values, e.g. text-[11px]. | | inline-style | 2 | 1 | Inline style props. | | alli-string | 1 | 0 | Warning only. An alli-* string outside a class prop. Never blocks and never affects the score. |

If a component can't do what you need, request a prop or variant from the design system team instead of working around it.

Scoring

score = 100 / (1 + density / 10)
density = weighted violation points per 1k lines of code

LOC is floored at 1k so tiny apps aren't over-penalised. A score of 100 is clean; about 50 means 10 points per 1k LOC.

Configuration

Create design-lint.config.json in the directory you run the CLI from, or pass --config:

{
  "ignore": ["**/generated/**"],
  "relaxed": ["**/custom/**"],
  "disabledRules": ["alli-class"]
}

| Key | Description | | --------------- | --------------------------------------------------------------------------------------------------------- | | ignore | Globs (relative to the app root) to skip entirely. | | relaxed | Globs where violations are reported as exceptions rather than counted. | | disabledRules | Rule ids to turn off. The design-system repo itself should disable alli-class. |

The scanner always skips node_modules, dist, build, coverage, .git, storybook-static and .next, as well as .d.ts, test, spec and stories files.

Adopting in an existing app

There are two ways to avoid a wall of failures on day one.

Baseline. Snapshot the current violations, then fail only on new ones:

alli-design-lint check . --baseline design-lint.baseline.json --update-baseline
alli-design-lint check . --baseline design-lint.baseline.json

Diff mode. Only violations on lines changed in the PR are blocking. Everything else is reported but never fails:

alli-design-lint check . --diff origin/main

CI

Copy examples/design-lint.yml to <app-repo>/.github/workflows/design-lint.yml and mark design-lint as a required check in branch protection. It runs in diff mode with --format github, so violations appear as inline PR annotations, and a summary is written to GITHUB_STEP_SUMMARY.

To also post a PR comment, add --comment-file comment.md --head-sha ${{ github.event.pull_request.head.sha }} and post the file. Line 1 is a hidden COMMENT_MARKER (<!-- a360-design-lint -->), so read it with head -1 to find and update the same comment on later runs, and only post a new comment when the lint failed.

Programmatic API

import { scanProject, loadConfig, summarize, renderText } from '@agencypmg/design-lint';

const summary = summarize(scanProject('apps/my-app', loadConfig('design-lint.config.json')));
console.log(summary.score, summary.violations);

Also exported: RULES, analyzeSource, classifyClass, isClassProp, DEFAULT_CONFIG, renderMarkdown, renderGithub, renderDiffMarkdown, renderComment, renderResolvedComment, COMMENT_MARKER, toBaseline, newViolations, applyDiff, parseDiff, getChangedLines, inDiff.

Development

npm ci
npm test

Releasing

Push a tag like v0.2.0 to publish @agencypmg/[email protected] via .github/workflows/release-design-lint.yml. The workflow runs the tests, sets the package version from the tag and publishes to npm.