Skip to content

feat: check cva and tv configs and tw tagged templates - #24

Merged
MaisonnatM merged 2 commits into
mainfrom
feat/variant-configs
Oct 20, 2026
Merged

MaisonnatM merged 2 commits into
mainfrom
feat/variant-configs

Conversation

@MaisonnatM

@MaisonnatM MaisonnatM commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Why

After #22, the last class strings the other canonical-class rules check and this one skips are cva variants, tv() configs, and tw`…` tagged templates.

Stacked on #22.

What changed

  • cva and tv configs. Classes are read from config values: base, slots, variant options (strings, arrays, slot objects), and class or className in compoundVariants and compoundSlots. defaultVariants and compound selectors such as { size: "sm" } are skipped, since they hold variant names. The second tv() argument configures tailwind-merge and is skipped.
  • Tagged templates. A calleeFunctions name also matches name`…` and name.div`…`, with the same template literal handling as feat: check ternaries, template literals with expressions, and object keys #22.
  • Defaults. calleeFunctions now defaults to ['cn', 'clsx', 'classNames', 'twMerge', 'cva', 'tv', 'tw']. Projects that set calleeFunctions keep their list.

Measurement

All bench fixtures from #21 except plain variables are now reported, against the real Tailwind worker. On the 400-file benchmark the report count stays at 21,645.

  • Thermo-nuclear code quality review

@MaisonnatM
MaisonnatM force-pushed the feat/more-class-sources branch from 61d08b7 to 7881888 Compare October 20, 2026 07:53
@MaisonnatM
MaisonnatM force-pushed the feat/variant-configs branch from dbc41a3 to 5d2b530 Compare October 20, 2026 07:53
@MaisonnatM
MaisonnatM force-pushed the feat/more-class-sources branch from 7881888 to 4724efe Compare October 20, 2026 08:11
@MaisonnatM
MaisonnatM force-pushed the feat/variant-configs branch 2 times, most recently from 2ed7c53 to 8e46257 Compare October 20, 2026 08:14
@MaisonnatM
MaisonnatM force-pushed the feat/more-class-sources branch 2 times, most recently from 6629840 to 14739c3 Compare October 20, 2026 08:15
@MaisonnatM
MaisonnatM force-pushed the feat/variant-configs branch from 8e46257 to d25026e Compare October 20, 2026 08:16
@MaisonnatM
MaisonnatM changed the base branch from feat/more-class-sources to main October 20, 2026 08:16
@MaisonnatM
MaisonnatM marked this pull request as ready for review October 20, 2026 08:17
@MaisonnatM
MaisonnatM merged commit 943a378 into main Oct 20, 2026
6 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 20, 2026
# [1.6.0](v1.5.0...v1.6.0) (2026-10-20)

### Features

* check cva and tv configs and tw tagged templates ([#24](#24)) ([943a378](943a378))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant