6 ms·
> The plugin will respect your tailwind.config.js file and work with any Tailwind plugins you’ve installed, but _there is no way to change the sort order_. Rea
by EspadaV9 3y ago
> The plugin will respect your tailwind.config.js file and work with any Tailwind plugins you’ve installed, but _there is no way to change the sort order_.
Really like that they don't give options to change the settings. Just one less thing to bike shed within teams. Really doesn't matter what is picked, just as long as it is consistent (and not obviously stupid).
- eviks 3y agoWhy is less-than-obviously stupid consistency better than choice?
- mplewis 3y agoPeople bikeshed given choices. When people have one choice, they get onto writing code that actually matters.
- eviks 3y agoThe more realistic outcome is they get onto bikeshedding other choices like pickigng a more configurable tool since, you know, you haven't actually eliminated choices, just reduced them without constraining: infinity - 1 = infinity
- williamdclt 3y agoDidn't happen in the ~dozen team I worked with, so I wouldn't say it's the "more realistic outcome"
- j4yav 3y agoPeople who can’t help but bikeshed will consistently find themselves surrounded by bikeshedding
- AlchemistCamp 3y agoVery true. Tools are often abandoned for being too restrictive and I’ve seen it several times just with formatters alone.
- deleted 3y ago[deleted]
- silviot 3y agoBecause otherwise you spend too much time arguing about not-so-important matters (in a word: bikeshed - you end up bikeshedding less).
- watwut 3y agoBecause it saves time and sanity. First, you don't have to deal with endless debates about stupid crap every other code review. Second, local wanna be controlling personalities have less space to nitpick choices of others and other do not have to deal with them.
- williamdclt 3y agoGiven it's Prettier's whole philosophy, best to read from them directly: - https://prettier.io/docs/en/why-prettier https://prettier.io/docs/en/why-prettier - https://prettier.io/docs/en/option-philosophy https://prettier.io/docs/en/option-philosophy
- AlchemistCamp 3y agoPrettier makes some obviously stupid choices though. That coupled with their disregard for their users is why I don’t use it. I switched to Rome (now Biome) after this debacle: https://github.com/prettier/prettier/issues/840 https://github.com/prettier/prettier/issues/840
- williamdclt 3y agoWhether they do make obviously stupid choices or not doesn't invalidate the principle. As to whether they do make obviously stupid choices - I personally don't mind any of their choices (even if I wouldn't have made the same choice myself), and I know I'm not alone in this position, which means that by definition they're not "obviously" stupid. You can disagree with the choices and the trade-offs, sure, that doesn't make it obviously stupid.
- AlchemistCamp 3y agoI detailed the reasons at length in the issue thread. It might not be obvious if you haven’t seen the code examples, but once you see it, it’s pretty clear. I also completely disagree with your reasoning above. The fact that many people believe or do some thing does not mean that “by definition” that that thing is not obviously stupid. E.g., inhaling glue, smashing things with one’s head, “the secret”, mukbang videos… the list is nearly endless. Finally, “the principle” behind Prettier is also flawed when taken to the extreme they do. Paraphrasing my final comment on the github issue, > It can be used to defend literally any styling choices, even ones that deliberately misaligned conditional branches with others at its logical level (much like prettier already is doing on a small scale in the example I referenced). > Yes human beings are adaptable, but some things are easier to adapt to than others. It's objectively easier to spell Spanish than English, for example. It pays off to have consistency at a deeper level than simply making the same idiosyncratic choices each time an identical situation comes up.
- ToValueFunfetti 3y agoI used to work in a restaurant where the thing that held the knives was agnostic about which direction the blade faced. It's quite beneficial to know which direction the knife is facing when grabbing it, so we wanted to establish a standard. There was a lengthy discussion about which was better, we picked one, then we had to train the rest of the staff and remember to tell new hires. And people still forgot, so having a standard was pointless. If the knife storage had been opinionated, we would have expended no effort and achieved consistency. The choice of direction was essentially arbitrary, but making a choice and sticking to it was valuable.
- stephenr 3y agoI've seen this "options mean people don't bikeshed" argument made about gofmt. The ‘original’ quote, from someone explaining why gofmt has no configuration options is: > The usual saying is that gofmt isn’t anybody’s preferred style, but it’s adequate for everybody. And the interpretation from someone asking about configuring some aspect of it is (emphasis mine): > The usual saying is that gofmt isn’t anybody’s preferred style, but it’s adequate for everybody who still using it Being opinionated about defaults is often a positive thing. Removing any options just makes your tool less useful.
- bakugo 3y ago"not obviously stupid" is entirely subjective. I think the way prettier handles parentheses in JS is very obviously stupid, for example.
- EspadaV9 3y agoJust curious, which rule is that? This is the only one I could see about parentheses - https://prettier.io/docs/en/options.html#arrow-function-parentheses https://prettier.io/docs/en/options.html#arrow-function-pare...
- bakugo 3y agoPrettier removes any parentheses that aren't strictly necessary. So if you type: value = (a ? ((a * b) + c) : d); It turns into: value = a ? a * b + c : d; This is just a very basic example, there are many situations where the result is way worse. I feel pretty confident in saying that this is quite obviously stupid.
- andkenneth 3y agoThis actually has a semantic purpose, it's not just about bike shedding. CSS classes, if applied to the same element, will prefer the class that's defined later in the CSS file. The plugin sorts them via priority order so it's more clear is one tag might override another.
- aidos 3y agoInteresting idea. I’ve seen people get very confused by thinking that adding them in a certain order to the element would give some sort of control. Which order do they do it in? Later classes are later in the css so more likely to be applied?
- dumbo-octopus 3y agoYes, the specificity/precedence is all determined statically from only the .css files, the class order has nothing to do with it. This is a good thing because it allows for methods like https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/add https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenLis... to not need to concern themselves with insert positions. https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity > If the competing selectors have the same values in all the three columns, the proximity rule comes into play, wherein the last declared style gets precedence.
- aidos 3y agoSorry, I meant what order does this is linter do it in? I’m well aware of how css works, I’ve been here since we did table layouts with shims!
- dumbo-octopus 3y agoThe order of the classes in the dom will match the order of the classes in the .css files