Skip to content

Option to apply to plain string variablesΒ #77

@kunanyi

Description

@kunanyi

I am using cn (clsw, twMerge) - this means I have class lists inside plain string variables.

Would be nice we could target the formatting for certain string variables:

const buttonClassName = 'flex h-8 w-8 items-center justify-center rounded-l-lg border-1 border-black';
return( <button className={cn(buttonClassName, 'extraClass')}>Button</button> );

In my VSCode I set up intellisense to recognize "*ClassName" variables, so "buttonClassName" gets the intellisense. Maybe the prettier config could also target variables with "*ClassName" patterns, or whatever the user chooses.

Metadata

Metadata

Assignees

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions