Design Token Lint
GitHub repository

Type to search...

to open search from anywhere

v1.1.0-next.2

Prerelease — Tailwind v4 important-modifier fix, multiline cn() extraction, --json/--format github output, config hardening, and a big testing-env upgrade.

Audit-driven improvement sweep, published under the next dist-tag. This prerelease supersedes v1.1.0-next.1, which was versioned but never published — its changes ship here too.

Bug Fixes

  • Tailwind v4 trailing important modifier (p-4!, bg-red-500!, sm:p-4!) no longer bypasses ban rules; the v3 leading ! form remains supported (6013ce5)

  • allowed now matches both the original class string (-mt-4, hover:p-2, bg-red-500/50) and the normalized form — the documented exact-match contract holds; copying a reported class into allowed works (6013ce5)

  • Multiline cn()/clsx()/class:list calls (the standard Prettier/shadcn format) are now fully extracted via a balanced-delimiter scanner instead of being silently skipped; nested calls and ) inside strings are handled (3abfb9b, efdeb51)

  • design-token-lint-ignore comments on inner lines of multiline constructs are honored, and violations report their true source line instead of the call-start line (2bc2e94)

  • Function-name matching gained a word boundary — identifiers like mycn(...) are no longer scanned (3abfb9b)

  • Static backtick template-literal arguments (cn(`p-6 m-6`)) are extracted; ${...} tokens still fall through per the documented interpolation behavior (3abfb9b)

  • className={"..."} (double-quote brace form) is now extracted (3abfb9b)

  • Malformed or wrongly-typed config files fail loudly with a clear message and exit code 2 instead of silently falling back to defaults; unknown CLI options are rejected; prohibited-pattern placeholders are validated at compile time (62e3d28, 1be17f5)

  • Fraction suffixes (w-1/2, inset-1/2) are no longer misread as opacity modifiers for spacing/sizing rules (12c4598)

  • CLI entrypoint detection compares realpaths, fixing a silent no-op under pnpm .bin shims (cecb6bd)

Features

  • --json prints the flat LintResult[] array on stdout for machine consumption; human output stays on stderr (a701725)

  • --format github emits GitHub Actions ::error annotations, auto-detected via the GITHUB_ACTIONS env var with the explicit flag winning; annotation fields are safely escaped (a701725, 115eb8c)

  • Default color rules now cover logical and Tailwind v4 utilities: border-s-*, border-e-*, ring-offset-*, inset-ring-*, inset-shadow-*, text-shadow-* (d3f048c)

Testing & CI

  • New test layers: subprocess tests over the built dist/cli.js, a golden-fixture suite over a committed sample project, and config-discovery tests; pnpm test now builds first so a clean checkout tests deterministically (372604b, 77956c6)

  • scripts/check-pack.sh verifies the packed npm tarball (bin, exit codes, exports map) and gates both CI and the publish workflow; a weekly registry smoke test exercises @latest and @next straight from npm (dafc814, c7e6dd0)

  • TESTING.md documents the testing archetypes for the package and the doc site (d8c720c)

  • Publish workflow now publishes with npm provenance and guards manual dispatch to v*.*.* tag refs; pnpm store caching across all workflows (31df01d, 3d8ed3c)

Docs & Site

  • Documentation site migrated from Astro to the zfb host-app stack on Cloudflare Workers, including the interactive Playground port (4d96227, e3647a1, 690b6ea)

  • Adopted zudo-doc 2.5.0 package islands, removing ~1,400 lines of duplicated island code (124f48f)

  • Docs parity sweep: corrected exit-code table, refreshed sample violation messages, documented semanticPrefixes and the new output flags, scoped the Vue/Svelte support claim honestly, synced the playground's browser lint engine with the fixed package logic (a19e7cd, 517f1ce)

Dependencies

  • glob v13 and dev-tooling refresh, carried over from the unpublished v1.1.0-next.1 (3f347a0)

  • TypeScript 6.0 (dev-only) (9313454)

Revision History

CreatedUpdated