systomic

Styling

Every rule that looks at styles reads all the ways to write them: Tailwind classes, inline styles, StyleX and stylesheets.

Every rule that looks at styles checks all the ways to write them:

  • Tailwind classes in className / class and class helpers (cn, clsx, cva, tv, …).
  • Inline styles: style={{ ... }} (camelCase or kebab-case keys).
  • StyleX: stylex.create(...), resolved through stylex.props(...) spreads and style / xstyle props.
  • Stylesheets: CSS modules (className={styles.menu}), stylesheets imported for their side effects (import "./menu.css") and settings.systomic.stylesheets, including @apply.
  • .css / .scss files themselves: through the Stylelint plugin (Oxlint can’t lint CSS).

animated-icon-swap and no-conditional-overlay don’t depend on styling.

Class and style options: attributes (class attributes, default ["className", "class"]), callees (class helpers, default cn, clsx, cx, classnames, twMerge, twJoin, cva, tv) and styleAttributes (default ["style", "xstyle"]). These are rule options, not settings: settings.systomic doesn’t read them, so pass them to each rule that should use them. A rule that doesn’t list an option rejects it: rules that don’t read class strings reject all three, and focus-visible and max-blur take attributes and callees but not styleAttributes. See Configuration for which rule takes which.

A list replaces the default, so repeat the defaults you still want:

Class strings behind references

Class strings are followed through:

  • const variables: const ring = "focus:ring-2"; <button className={ring} />
  • cva / tv definitions and functions returning classes: className={buttonVariants({ size })}
  • object maps: sizes[size], classes.root (also as const)
  • imports from other files and packages, same resolution as component-overrides.

Rules that fix strings (focus-visible, prefer-dvh) report them where they are defined, once, and leave strings in other files to the lint run of that file. Element rules (component-overrides, origin-aware-scale, tabular-nums) see everything an element gets and report on the element.

Stylesheets

CSS modules and imported stylesheets are found automatically. Plain CSS and SCSS are parsed (nesting is resolved, and a Tailwind v4 @utility touch-hitbox { … } counts as .touch-hitbox). For an element, the rules read the declarations of its classes, the @keyframes they use and their @apply’d utilities. A declaration counts as a state (like a variant) when the selector adds anything to the class (.menu[data-state=closed], .icon:active) or sits in @media / @starting-style.

Stylelint

Esc