npm / @shadcn/lint
@shadcn/lint
What changed in @shadcn/lint 0.1 to 0.2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
3 breaking2 new APIs and options4 performance3 behavior and defaults60 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@shadcn/lint 0.252 changes
Breaking changes 1
Resolve theme imports like Tailwind through a package's style condition or field, reading the stylesheet rather than a JavaScript bundle.
New APIs and options 2
Set this environment variable in milliseconds to change how long the linter waits for a slow Tailwind worker.
Adds support for Vue and Svelte.
Performance 4
Reads class tokens and theme values in one pass, avoiding seconds of linting on tokens with thousands of unclosed brackets.
Reads a const once per class site, avoiding exponential work on conditional chains and duplicate reports for classes reached through both branches.
Reads stylesheets with an unterminated
@importin one pass instead of rescanning the rest of the file for a semicolon for each import.Reads imports, export lists, and default exports in linear time, preventing long whitespace runs or unclosed export lists from stalling lint.
Behavior and default changes 2
Warn when a Tailwind worker failure causes fallback to the bundled grammar.
Classifies project custom theme scales, such as rounded-card, the way cn 0.4.0 merges them.
Fixes and other changes 43
Read variants and sizes from a buttonVariants factory imported from another project module through a relative path or alias.
Follow same-file cva or tv results so no-restyle checks every producible variant and require-static-classes does not report them as dynamic.
Do not interpret data-* or aria-* attributes as class lists.
Stop warning about contract entries generated by the theme's Tailwind build, such as prose from a plugin.
Resolve namespaced components before joining names so re-exported package raw parts are not mistaken for matching ui components.
Leave a plain render target alone when its component adds no classes, preventing no-restyle and require-static-classes from judging it by that component.
Recognize components named in settings.shadcn.ui when imported through the app's own barrel.
Keep the numeric spacing scale when a theme sets --spacing after --*: initial or --spacing-*: initial, preserving spacing-class interpretation.
Read paths from a root tsconfig.base.json when the root tsconfig.json or jsconfig.json has none.
Resolves components through barrel chains thousands of files deep instead of resolving nothing when the chain exceeds the call stack.
Stops following a const chain after 64 links and treats the rest as dynamic, preventing generated chains from overflowing the stack and aborting the run.
Reads export lists past closing-brace characters inside comments, preserving names that follow them.
Skips classes longer than 10,000 characters, classes with more than 64 variants, and classes that make Tailwind throw, avoiding worker stalls or disabling Tailwind for the whole theme.
Stops following package
exportsconditions 32 levels deep, preventing deeply nested manifests from overflowing the stack in every rule.Follows package
exportsorimportstargets only when they are relative and remain inside the package, and avoids statting UNC paths outside the project.Treats a theme variable as unresolved when resolving it would grow its value past 100,000 characters, avoiding oversized strings and stack overflow.
Ignores a non-string
baseUrl, a non-objectpathsvalue, and non-stringpathstargets instead of throwing from every rule.Resolves a Svelte $derived(expr) binding to expr so reactive class and style values are read like a const.
Checks components reached through nested namespaces by resolving each segment through
export * asbarrels.Accepts --border-color-* tokens for divide-* classes, matching Tailwind's fallback from --divide-color-*.
Accepts color functions whose channels are one theme variable in SVG attributes and no-inline-styles custom properties; literal channels and a var() fallback remain reported.
Classifies tw-animate-css classes such as animate-in, fade-in, and slide-in-from-top-1 as motion when the theme imports the package.
Checks a wrapper's other class props against the component the wrapper hands them to, rather than the component receiving className.
Skips plain object property keys while continuing to check class object keys.
Checks a CSS custom property passed to a Svelte component the way no-inline-styles checks a style attribute.
Checks stop-color, flood-color, and lighting-color in Svelte and Vue markup as no-raw-colors checks stopColor in JSX.
Resolves theme variables such as --radius from :root and @theme for scale and color suggestions, rather than from a later scoped selector.
Resolves a bare aliases.ui value such as src/ against the project, as the shadcn CLI does.
Reads Svelte shorthand attributes such as {className} the same way as their long form.
Font sizes from JavaScript @config modules are classified as typography rather than color.
Loads @config modules like Tailwind, allowing extensionless imports and TypeScript enums to build.
Checks variant classes keyed by computed names such as enum members.
Suggests variants only from a cva factory the component actually uses.
Matches dotted entries such as Option.some against method calls.
Allows fill-none and stroke-none in no-raw-colors.
Resolves a ui alias to a directory through wildcard package.json imports keys.
Font sizes from JavaScript @plugin modules are classified as typography rather than color.
Loads @plugin modules like Tailwind, allowing extensionless imports and TypeScript enums to build.
Judges classes by the component itself when its render prop renders a plain element.
Resolves Tailwind beside the stylesheet that imports it.
Under a Tailwind prefix, unprefixed classes are left to no-unknown-classes instead of being reported as undeclared colors.
Suggests variants only from a tv factory the component actually uses.
Reads a barrel when its export list carries comments.
@shadcn/lint 0.120 changes
Breaking changes 2
Only Tailwind's own animate-* names now share the animate group.
Axis utilities such as px-2 now conflict with the logical sides they cover.
Behavior and default changes 1
An animate-* class classifies as motion when the theme declares --animate-<name> or CSS declares it with @utility or a selector, without requiring cn to group every animate-* name.
Fixes and other changes 17
Reads a destructured binding's own slot of its initializer.
Resolves a ui package's alias to its own name.
Fixes handling of exports patterns.
Fixes plain selectors hiding raw colors.
Fixes scoped color namespaces.
Fixes theme reading past comments.
Fixes the TypeScript parser peer warning.
Astro class:list is treated as a class site, including when its value is a Set.
Declared --text-* and --shadow-* tokens are no longer reported as raw colors.
Component names are no longer derived from a package's minified exports.
A declared @utility class is no longer treated as a misspelling.
Classes are attributed to the component rendered by a render prop.
Classes on the trigger are retained when a render prop cannot be read.
Tailwind 3 utility names such as flex-grow and flex-shrink are classified.
When tailwind.css is a partial, base utilities are read from a discovered entry.
Theme imports resolve from a pnpm-linked package's real path.
Variant names are read through a type alias and a props union.