Off topic but every once and a while I'm made aware of the impact prettier has had on my typing. It's so hard to write code without a tool like prettier because formatting related keystrokes have largely been removed from my muscle memory. You basically end up writing a sort of shorthand.
Yeah it’s true. Its not simply that you don’t have to manually format things a certain way. You simply don’t format things at all. You can avoid writing lots of spaces, newlines, semi colons, etc. it’s absolute garbage, then you save it, then it’s fine.
Why is Prettier rock solid?
71–80 of 163 posts
Re: Why is Prettier rock solid?
#72Earlier quoted context omitted.
> until a particularly silly pedantic argument won them over. Which comment are you referring to? The release notes sound practical
https://github.com/prettier/prettier/issues/15942#issuecomme... I sort of misspoke, the comment itself is not silly, just the fact that it was that point that got a resolution.
1: Suggested package: sillier.
Re: Why is Prettier rock solid?
#73Earlier quoted context omitted.
Yeah it’s true. Its not simply that you don’t have to manually format things a certain way. You simply don’t format things at all. You can avoid writing lots of spaces, newlines, semi colons, etc. it’s absolute garbage, then you save it, then it’s fine.
And autoformatters have cemented my preference for non-white spaced languages. As you say, just write whatever and let it format it. When I then switch to our python backend this strategy no longer works. Like, it can fix something, but it needs a much cleaner state to do so. For instance if my loops are indented wrong, black can't solve that as the decision it makes has a semantic meaning.
There are a few linting rules that can help identify semantic errors or dead code, but only a small number of rules are needed to get all of the benefits.
Autoformatting (prettier, gofmt, etc.) is the way to go.
Re: Why is Prettier rock solid?
#74Skimming past the capital "P", I read this as "why is prettier rock, solid" . . . and was left perplexed, as most rocks are solid.
Re: Why is Prettier rock solid?
#75Re: Why is Prettier rock solid?
#76Re: Why is Prettier rock solid?
#77I picked up standard[1] a while back for this reason, I don't want to have to think about it. It works fine, I have no complaints (took me a while to get used to not using semi-colons but now I prefer it) Same reason I use `cargo fmt` as well. [1] https://standardjs.com/
Here's a surprise:
const a = 1
const b = 2
(a+b).toString()
Calling the convention "standard" was irresponsible, and it led many people (especially beginners) to assume that it was some sort of a preferred convention. Glad I'm seeing it less these days; thanks to TypeScript, and people following Microsoft's conventions.Re: Why is Prettier rock solid?
#78Off topic but every once and a while I'm made aware of the impact prettier has had on my typing. It's so hard to write code without a tool like prettier because formatting related keystrokes have largely been removed from my muscle memory. You basically end up writing a sort of shorthand.
I code in an entirely different way now, I would of thought it impossible to change my ways (about 20 years of coding)
Re: Why is Prettier rock solid?
#79Re: Why is Prettier rock solid?
#80My complaint--and MDN and the W3C's complaint--with it is that it puts a closing slash on HTML void elements. While this is allowed for backwards compatibility with XHTML, it is not specified as being useful or needed in any HTML specification and has led to countless confusion among noobs who don't read the specification and only follow online articles. https://html.spec.whatwg.org/dev/syntax.html#start-tags