Disallow unnecessary whitespace in between and around tailwind classes.
-
allowMultiline
Allow multi-line class declarations.
If this option is disabled, template literal strings will be collapsed into a single line string wherever possible. Must be set totrue
when used in combination with readable-tailwind/multiline.Type:
boolean
Default:true
-
classAttributes
The name of the attribute that contains the tailwind classes. This can also be set globally via the [
settings
object](../settings/settings.md.Type: Array of Name, Regex or Matchers
Default: Name for"class"
and strings Matcher for"class", "className"
-
callees
List of function names which arguments should also get linted. This can also be set globally via the [
settings
object](../settings/settings.md.Type: Array of Name, Regex or Matchers
Default: Matchers for"cc", "clb", "clsx", "cn", "cnb", "ctl", "cva", "cx", "dcnb", "objstr", "tv", "twJoin", "twMerge"
-
variables
List of variable names which initializer should also get linted. This can also be set globally via the [
settings
object](../settings/settings.md.Type: Array of Name, Regex or Matchers
Default: strings Matcher for"className", "classNames", "classes", "style", "styles"
// ❌ BAD: random unnecessary whitespace
<div class=" text-black underline hover:text-opacity-70 " />;
// ✅ GOOD: only necessary whitespace is remaining
<div class="text-black underline hover:text-opacity-70"/>;