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/classand class helpers (cn,clsx,cva,tv, …). - Inline styles:
style={{ ... }}(camelCase or kebab-case keys). - StyleX:
stylex.create(...), resolved throughstylex.props(...)spreads andstyle/xstyleprops. - Stylesheets: CSS modules (
className={styles.menu}), stylesheets imported for their side effects (import "./menu.css") andsettings.systomic.stylesheets, including@apply. .css/.scssfiles 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:
1234"rules": { "systomic/focus-visible": ["error", { "callees": ["cn", "clsx", "cx", "classnames", "twMerge", "twJoin", "cva", "tv", "sx"] }], "systomic/no-hardcoded-values": ["warn", { "callees": ["cn", "clsx", "cx", "classnames", "twMerge", "twJoin", "cva", "tv", "sx"] }]}Class strings behind references
Class strings are followed through:
constvariables:const ring = "focus:ring-2"; <button className={ring} />cva/tvdefinitions and functions returning classes:className={buttonVariants({ size })}- object maps:
sizes[size],classes.root(alsoas 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
123456"settings": { "systomic": { // Global stylesheets whose classes are used by name (globs, relative to the package root). "stylesheets": ["src/styles/*.css"] }}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
1export default { extends: ["systomic/configs/stylelint.mjs"] };| Rule | Default |
|---|---|
systomic/focus-visible |
error |
systomic/origin-aware-scale |
error |
systomic/input-font-size |
warning |
systomic/prefer-dvh |
warning |
systomic/prefer-transition |
warning |