perfectionist icon indicating copy to clipboard operation
perfectionist copied to clipboard

Remove option for hex capitalization

Open keithjgrant opened this issue 8 years ago • 5 comments

I think this config option is a good candidate for deletion. We should take a particular stance. Should hex values be uppercase or lowercase?

(I think public opinion on this leans mostly toward lowercase)

keithjgrant avatar May 12 '17 15:05 keithjgrant

Why should we remove the alignability? Someone could have another code style in team, why they should change it or freeze library version because of public opinion?

vansosnin avatar May 12 '17 17:05 vansosnin

@vansosnin We're thinking of changing perfectionist to be more of a "set and forget" tool, whereas https://github.com/morishitter/stylefmt should be used for a completely customisable option. That way we can provide the community with two distinct options, rather than trying to compete in our feature sets. 😄

ben-eb avatar May 12 '17 21:05 ben-eb

FYI, stylelint-config-standard enforces lower and short.

One thing to bare in mind is that, I believe, this involves transforming the values of a node within the AST. This is a line that prettier doesn't cross. perfectionist doesn't need to draw the same line, but I think it's worth thinking about where a line might be drawn.

jeddy3 avatar May 12 '17 23:05 jeddy3

perfectionist doesn't need to draw the same line, but I think it's worth thinking about where a line might be drawn.

I've thought so more about this and I've written a proposal that suggest drawing the exact same line.

The proposal contains, what I hope to be, the ideal balance between being configurable and "set and forget".

jeddy3 avatar May 13 '17 11:05 jeddy3

this involves transforming the values of a node within the AST. This is a line that prettier doesn't cross.

Not really. Changing the casing (and length) of hex colors is something that Prettier definitely would do.

lydell avatar May 20 '17 07:05 lydell