Skip to content

allow printing class names with space instead of bullet point #275

@190n

Description

@190n

Description

I noticed that when class names are printed, spaces are converted to bullet points:

export function display(classes: string): string {
return classes
.replaceAll(" ", "·")
.replaceAll("\n", "↵\n")
.replaceAll("\r", "↩\r")
.replaceAll("\t", "→");
}

│   108:21  error  Incorrect class order. Expected
│ 
│ "text-2xl·font-bold·leading-[34px]·text-text"
│ 
│ to be
│ 
│ "text-2xl·leading-[34px]·font-bold·text-text"  better-tailwindcss/enforce-consistent-class-order

I don't love this behavior because if I simply copy the class name that is printed, my code won't work but the lint error will go away. It makes it harder to manually apply lint suggestions from the output. Would it be possible to make this behavior configurable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions