JedWatson / classnames

A simple javascript utility for conditionally joining classNames together
MIT License
17.62k stars 563 forks source link

Update README code space and variable declarations #388

Closed wozitto closed 7 months ago

wozitto commented 7 months ago

1. Changed code space from tab to two spaces

The space in the code block has been replaced by a tab from two spaces in the PR here. When I look at the space with tabs in preview, I feel the space is too wide, so I will change it back to two spaces.

2. Changed let declarations to const declarations in the "Dynamic class names with ES2015" example

Since the const declaration has been available from ES2015, I have used it to maintain consistency with other implementation examples.

dcousens commented 7 months ago

This project seems to using tabs typically, but I don't really mind when 2 space is relatively standard in Javascript and this is only documentation

wozitto commented 7 months ago

@dcousens Indeed, whether it is Tab or 2 space is a trivial difference. However, since "Real-world example:" uses 2 space, I think it would be better to unify them for the sake of document consistency. And at least to me it looks cleaner to use 2 space. 👀

jonkoops commented 7 months ago

I think this is a good thing to land, first and foremost because our documentation already uses inconsistent indentation in code examples. Secondarily because be default GitHub indentation for tabs is quite wide.