The Quest To Destroy Prettier

  Рет қаралды 104,938

Theo - t3․gg

Theo - t3․gg

Күн бұрын

Пікірлер: 228
@abots
@abots Жыл бұрын
Making prettier faster is definitely something I didn't see happening in 2023...
@modernkennnern
@modernkennnern Жыл бұрын
Ye, why does this matter? It's practically instant already. I'm never saying no to improved performance, but sometimes it seems like it's just for show.
@jeffreysmith9837
@jeffreysmith9837 Жыл бұрын
@@modernkennnern it's fucking slow bozo
@jeffreysmith9837
@jeffreysmith9837 Жыл бұрын
Sorry for calling bozo the slowness just pisses me off LMAO. If you have multiple files open and save all it's a nightmare
@asdfghyter
@asdfghyter Жыл бұрын
@@modernkennnern I'm assuming it can be relevant if you have a huge codebase
@guanbo-yang
@guanbo-yang Жыл бұрын
​@@asdfghyter People won't change the whole codebase in a single commit, and I think we usually only need to prettify the modified part
@zactron1997
@zactron1997 Жыл бұрын
This is one of the reasons I keep using Rust for new projects. Cargo with it's built in linter, formatter, package manager, documenter, etc. makes projects so standardized across the whole ecosystem. Once you know any Rust, it's very easy to go from one project to something completely different, because you're basically guaranteed all the tooling is identical. Standard and performant tooling is an absolute must for any language going forward.
@tombrown6183
@tombrown6183 Жыл бұрын
TS also has one and it's called deno
@xinaesthetic
@xinaesthetic Жыл бұрын
​@@tombrown6183TS doesn't have "you're basically guaranteed all the tooling is identical", and it's hard to see how deno or anything else could change that now.
@samuelwittlinger7790
@samuelwittlinger7790 Жыл бұрын
I personally hate rust tooling as it feels very unpolished. The biggest pain points for me are the autocomplete in my editor sometimes just doesn't work, some errors not being detected by the compiler before fixing other ones, errors showing up only after I save, the test runner being output being hard to read. Everyone in the rust ecosystem says how good these tools are, yet when compared to typescript tooling (which is admittedly scattered around multiple projects) it feels like these rust tools are in their alpha versions.
@mk72v2oq
@mk72v2oq Жыл бұрын
​@@samuelwittlinger7790presumably those are problems of your editor / LSP integration, not of rust-analyzer itself. Because it has no such problems in VS Code.
@zactron1997
@zactron1997 Жыл бұрын
@@samuelwittlinger7790 I'd rather that (which I definitely don't experience with VSCode btw) and a consistent ecosystem than every project I work on having a totally unique combination of tooling. Grunt vs Bun vs Deno vs Node vs TS vs JSDoc vs etc. etc. Onboarding onto a JS project is like learning a whole new world every time. And that's if you're lucky enough to join a new project. I had to jump into an existing AngularJS + Grunt + .NET project and everything was entirely bespoke. Took weeks to actually understand what the build system did, let alone what it was supposed to do.
@MichiganTypeScript
@MichiganTypeScript Жыл бұрын
We have a one and a half hour video interviewing Biome's main author on the Michigan TypeScript channel if anyone is more interested. Many topics about Biome covered but of course we get into this specific topic of prettier, as well. great video as always Theo!
@jeffreysmith9837
@jeffreysmith9837 Жыл бұрын
Careful he'll make a half hour "reaction" video
@offroaders123
@offroaders123 Жыл бұрын
Hey, I know you from somewhere 🕵🏼‍♂️
@jacksonbourne
@jacksonbourne Жыл бұрын
2-4x faster is good, but it misses the point entirely. Using a compiled language like Rust (or Zig, etc....) could be in the range of 10-100x faster.
@TheNewton
@TheNewton Жыл бұрын
yeah use jAvAsCrIpT-CaChE is the worst type of incrementalism-bandaid that people will try to pass as some of brilliant truth but just encourages stagnation.
@fltfathin
@fltfathin Жыл бұрын
@@TheNewton just imagine how much memory it will use
@Adelphos0653
@Adelphos0653 Жыл бұрын
My company switched to Rome/biome and haven't looked back. It's been fantastic
@wagnermoreira786
@wagnermoreira786 Жыл бұрын
What improved?
@najlepszyinformatyk1661
@najlepszyinformatyk1661 Жыл бұрын
@@wagnermoreira786 nothing
@KieranTully
@KieranTully Жыл бұрын
By Xargs -p they presumably mean parallel processing - use xargs to spawn multiple copies of prettier working on different files in parallel.
@NotBlackyy
@NotBlackyy Жыл бұрын
I think everyone should have a look at Ruff from the python ecosystem. Other linters and formatters didn't necessarily feel slow, but Ruff is *instant*. I do agree that Prettier is slow even for JS standards, but I found the instant formatting of Ruff and rustfmt really pleasant. You can truly feel the difference.
@superchupu
@superchupu Жыл бұрын
i believe ruff's formatter was initially based on biome's formatter infrastructure
@14arjun14
@14arjun14 Жыл бұрын
I'm very disappointed with the clickbaity video title
@electrolyteorb
@electrolyteorb 9 ай бұрын
Not at all
@weeb3277
@weeb3277 Жыл бұрын
5:30 from the man page: -P maxprocs Parallel mode: run at most maxprocs invocations of utility at once. If maxprocs is set to 0, xargs will run as many processes as possible.
@ggandalff
@ggandalff Жыл бұрын
In Python we ruff, which has been exploding in use because it's an all in one solution for many things that used to be in separate tools, an recently they also added formatting. I hope JavaScript gets something similar to it, it's simplified a lot our flow. PS: In python there is a push to have single imports per line. It's great because it simplifies diffs and reduces the possibility of having merge conflicts. Why haven't I've seen some option like it in JavaScript?
@dinckelman
@dinckelman Жыл бұрын
Merge conflicts like this appear as a result of inconsistency between your code styles. You either enforce block imports, or single ones. But that said, ruff has been absolutely excellent
@lowwastehighmelanin
@lowwastehighmelanin Жыл бұрын
Because there's too many new ideas all the time
@PaulSebastianM
@PaulSebastianM Жыл бұрын
Bun brought a built-in formatter, no?
@CTimmerman
@CTimmerman Жыл бұрын
Fix the diff tools to show inline non-whitespace diffs instead of bloating every codebase.
@ggandalff
@ggandalff Жыл бұрын
@@dinckelman what I meant is that I want something like reorder-python-imports (ruff includes it). You should check in their repository at the section "why this style?", where they explain why it allows a reduction of merge conflicts caused by new imports in separate PRs
@ronanru
@ronanru Жыл бұрын
You should have put is-odd or leftpad as other dependencies on the thumbnail.
@t3dotgg
@t3dotgg Жыл бұрын
God damn this is a good idea
@ennioVisco
@ennioVisco Жыл бұрын
About building, it is worth mentioning that Evan You is working on a new project in Rust called Rolldown that is aiming at merging Esbuild and Rollup features
@edumorango
@edumorango Жыл бұрын
I could swear you would add Summoning Salt theme this time around 😂
@t3dotgg
@t3dotgg Жыл бұрын
The video was edited before I came up with the title 🤣 next time!
@macienrique
@macienrique Жыл бұрын
My 2 favorite topics, speedrunning and programming
@Tszyu01
@Tszyu01 Жыл бұрын
Prettier is the least of my problems in building applications. After configuring and installing it, creating a shareable plugin across all my projects, I literally never think about it again. After a project has been formatted, are people seeing more than a second for formatting a file or something?
@KayleMaster
@KayleMaster Жыл бұрын
I'd assume no, but it makes for a great clickbait video topic!
@cefnhoile
@cefnhoile Жыл бұрын
It's not an area of optimisation I've ever worried about. It's already near instant in any use cases I depend on so I haven't a huge amount of interest in this work. In what scenario do we care about this optimisation?
@moodynoob
@moodynoob Жыл бұрын
It becomes an issue when you introduce it to pre-commit hooks or other scripts - the lag with Prettier is annoying. A formatter like Biome can format 1000s of files in under a second so you really don't notice it.
@howl404
@howl404 Жыл бұрын
@@moodynoob Format only staged files?
@superchupu
@superchupu Жыл бұрын
prettier just runs too slow for big codebases. node is discussing switching to biome as the formatter and it's capable of formatting the whole codebase in literally a second
@SSpirite
@SSpirite Ай бұрын
​@@superchupu Why don`t setup formatting on save? Or your projects all 100k+ files?
@hugazo
@hugazo Жыл бұрын
I don't use it, but i have a strong eslint setup with hooks, so it forces developers to get their practices better with time, consistent code is the result.
@radomane
@radomane Жыл бұрын
dartfmt is the goat of having a built in formatter in the language
@dinckelman
@dinckelman Жыл бұрын
I've switched my recent project from eslint to Biome, and my experience this time around is actually pretty good. During the Rome era it did not really work very well, but the current team is putting some good effort in. My only two issues at the moment, are that a lot of the linting rules can't be formatted without --apply-unsafe, and the editor plugins.... can use work
@jaredsmith5826
@jaredsmith5826 Жыл бұрын
Prettier is already for the most part fast enough for me. But I'd give my eyeteeth to get a faster version of ESLint. Watching biome _very_ closely.
@dinckelman
@dinckelman Жыл бұрын
@@jaredsmith5826 it's not really about the speed, at my project scale, but I would understand why people strongly prefer that. For me, it was mostly about consistency, configurability, and uniformity. It's much easier to work with just one thing, than several conflicting tools. Obviously the upcoming Eslint alpha will be addressing this, but nonetheless
@enriquedlc2d
@enriquedlc2d Жыл бұрын
Currently using biome for my side projects, easier to configure and faster than prettier/eslint
@voidmind
@voidmind Жыл бұрын
I'd use prettier if it allowed me to define what formatting rules to enforce. Sorry, but I just can't accept some of the "opinionated" things it has that I can't change.
@jimhize
@jimhize 11 күн бұрын
It shines in a team where every team member has a few things they won’t accept that others want. It just makes the conversation go away.
@belgac
@belgac Жыл бұрын
I fully agree on the part that prettier or anything else removes the slow down on discussing code formatting. The only thing that bothers me about the prettier approach is that it s focused on the line length and not on meaningful diff of a commit
@qwelias
@qwelias Жыл бұрын
having almost 10yrs in webdev I'm convinced I don't like working with people obsessed with code formatting, just having tsc is good enough, tsc + dprint (or something as lightweight) is as far as I'd prefer to go
@snerpletiger8761
@snerpletiger8761 Жыл бұрын
! have no idea what u are talking about but I love the mustache!
@gFamWeb
@gFamWeb Жыл бұрын
This is the one thing that I think makes JavaScript so confusing to some people. We have a language with tooling written in the same language, sometimes for the same runtime. The only reason we use Node for frontend is because all the tooling is in JS. But a majority of the code written in a frontend project that uses Node is never run on the Node runtime. It's wild.
@Lamevire
@Lamevire Жыл бұрын
why is that confusing? this speaks for the language, no?
@gFamWeb
@gFamWeb Жыл бұрын
@@Lamevire If you could point me to another widely-used programming setup where tooling and runtime code are both written in the same language and installed from the same repository, I would potentially revise my statement. But, from my understanding, it's pretty unique.
@Daniel15au
@Daniel15au Жыл бұрын
​​@@gFamWebI'm not sure if this is what you mean but a lot of C# and the .NET Framework is itself written in C# using the same developer tooling (ie Visual Studio) and the same package management system (NuGet) as end-users use, and the framework itself is published as packages on NuGet. Developers write C# code using tooling built with C#, and the projects contain NuGet packages for both dev tooling and runtime dependencies.
@cristopher5837
@cristopher5837 Жыл бұрын
You can try ESLint Stylistic too, not a 1:1 capabilities compared to Prettier, but hey it still gets the job done
@ronanru
@ronanru Жыл бұрын
Pretty sure Theo did a rant about why styling with eslint is a bad idea
@ronanru
@ronanru Жыл бұрын
kzbin.info/www/bejne/eZWQmHWur8immqM
@cristopher5837
@cristopher5837 Жыл бұрын
@@ronanru I haven't seen it, where can I see it?
@ronanru
@ronanru Жыл бұрын
@@cristopher5837 The video is titled "You're (Probably) Using Prettier Wrong"
@JeremyKolassa
@JeremyKolassa Жыл бұрын
ESLint also says to not do this, and all stylistic rules are deprecated (IIRC)
@guyaaa-zf2zz
@guyaaa-zf2zz Жыл бұрын
can you do a video where you go over a bigass open source codebase from top to bottom (such as prettier). A lot of us want to try contributing to open source but how no clue where to start reading and understanding how the code works and functions
@danisimeonov4759
@danisimeonov4759 11 ай бұрын
You shouldn’t contribute to open source if you have no idea… Learn, deep dive, and just tinker with peoples work that interests you. If you find a way to make something better, do a PR. It’s such backwards thinking to start by wanting to contribute - even if you are clueless.
@somenamesome
@somenamesome Жыл бұрын
I feel if Javascript could only adopt actual optional typing (wrong type=error), it would solve a majority of the issues everybody deals with
@RajinderYadav
@RajinderYadav Жыл бұрын
You mean like TypeScript does today. Also typing is "optional" in TS if you didn't know. 😂 just need to make it so in the TS config.
@rez188
@rez188 Жыл бұрын
@@RajinderYadavsounds like someone doesn't know all the problems exclusively caused by typescript
@somenamesome
@somenamesome Жыл бұрын
@@RajinderYadav Typescript doesn't exist at runtime
@LusidDreaming
@LusidDreaming Жыл бұрын
What is this Cmd+S? Does he mean :w?
@JaeTLDR1
@JaeTLDR1 Жыл бұрын
Prettier has so many awful rules. Like pep anything not dictated by the language is going to be messy.
@Sindoku
@Sindoku Жыл бұрын
On a serious note, I think it would be fun to create a miniature JS formatter that can start from the top of a file (or where the cursor currently is in the file), and then format it using the same or similar rules as prettier. I’ll never be able to become good enough at rust (or JS) to be able to keep up with all the people doing it now that already are strong in both languages, but this would be a good project to get my feet wet.
@rewrose2838
@rewrose2838 Жыл бұрын
Yeah I feel the same way about my project ideas. If they are at all doable for me, then someone else has already done it and its better than what I could ever do right now. But still worth building it I think, as it will be good learning opportunity
@bagheldevansh
@bagheldevansh Жыл бұрын
video on arc browser soon?
@Jonas-Seiler
@Jonas-Seiler Жыл бұрын
why exactly do we need this performance increase
@sujeet4410
@sujeet4410 Жыл бұрын
LMAO Yess ... Never have I thought "Why's prettier slow?"
@ninhdang1106
@ninhdang1106 Жыл бұрын
Left side tab bar is sick ngl
@Leto2ndAtreides
@Leto2ndAtreides Жыл бұрын
I'd try it, but I don't want to put effort into it if other people are likely already going for the kill.
@Captain.Mystic
@Captain.Mystic Жыл бұрын
We again come to the conclusion that the only real thing js ever actually offered was job opportunities from cloud services and those who want to push ads in every corner of the desktop.
@SanyaJuutilainen
@SanyaJuutilainen Жыл бұрын
Prettier, I don't need faster at the moment, the prettifying is basically instant if you have them set up in IDEs. Linting, that's a different story altogether - CSS and JS linting are current major bottlenecks.
@EditioCastigata
@EditioCastigata Жыл бұрын
Chosing Rust is misleading. Other languages, such as the mentioned Go, would make working on the solution more accessible.
@tobiasnickel3750
@tobiasnickel3750 Жыл бұрын
once these tools are faster, someone will make a wrapper around it with some extra feature, ruining the performance, still be fast on small projects, and thus be just as slow as today and 15 years ago.
@ruaidhrilumsden
@ruaidhrilumsden Жыл бұрын
Am i missing something? When I format a file it happens instantly. I've never considered it at all slow. What's the advantage of this apparent performance increase?
@jameshobbs
@jameshobbs Жыл бұрын
🦗🦗🦗🦗🦗
@ruaidhrilumsden
@ruaidhrilumsden Жыл бұрын
@@jameshobbs crickets?
@jameshobbs
@jameshobbs Жыл бұрын
@@ruaidhrilumsden yeah, I think that's all we're going to hear as this doesn't seem to be a real problem (the speed of Prettier)
@ruaidhrilumsden
@ruaidhrilumsden Жыл бұрын
@@jameshobbs lol. Yeah that should have been obvious, thanks for spelling it out! So there's not any hidden benefit that I'm to dumb to understand, it's just a massive waste of time on premature optimisation!
@2mbst1
@2mbst1 Жыл бұрын
On the user facing side this might seem negligible for the individual, but faster programs = less cpu = less energy. Multiply this saving by the numbers of users times eg a year and there’s a shitton to be saved. Then there are a lot of people who do not have the latest and greatest tech but want to get into this, and it might not be instant for them. Especially if running in a browser on an OS that hogs a lot of resources for telemetry and boulevard news. Also: it’s not rare to want to run these things on entire projects. Eg automated after push. And so on. So making things efficient aka fast is a matter of accessibility too.
@TheOneAnOnlyGuy
@TheOneAnOnlyGuy Жыл бұрын
I don't think those discussions are 'bickering': Formatting has a semantic component as well, I don't think there are hard and fast rules, only depending on the syntax.
@tiagopaim3060
@tiagopaim3060 Жыл бұрын
I started using prettier 20 days ago. Ive always used dprint. Im not going back. Speed isn't all, specially for a tool like this
@Dev-Siri
@Dev-Siri Жыл бұрын
finally they're addressing it. my vscode gets stuck everytime I try to save, sometimes it even makes me wait like 10s, and this is on a good speced pc, that's not running prettier fast.
@TheNewton
@TheNewton Жыл бұрын
That's a clue that such things should not even be anywhere near your save step or in your editor. Move it to pre- or post commit step.
@NorthernChimp
@NorthernChimp Жыл бұрын
The concern I felt reading the title 😟
@harmkraats
@harmkraats Жыл бұрын
I like you are using Arc as your browser :)
@idavidgeo
@idavidgeo Жыл бұрын
Can you please explain how to properly protect a public nextJS API endpoint? I was always under the impression that the default same-origin CORS policy will restrict API access to only allow requests that are done from the same domain where the API is hosted. I recently had my emailing server attacked and all credits used up cause someone spammed my endpoint with Postman. I find Vercel's statement about default same-origin policy very misleading.
@GabrielSoldani
@GabrielSoldani Жыл бұрын
CORS prevents _browsers_ from using your API from disallowed origins. As in, no one can publish an alternate front end that calls your API. But it won’t prevent things like Postman and cURL from sending requests.
@Z4KIUS
@Z4KIUS 9 ай бұрын
I mean, I'm fine with the convention being wrong as long as it is consistent... but it rarely is a block is a block, don't make a class different from a conditional block different from a loop body! also, Allman all the things! but that comes after the consistency
@Sindoku
@Sindoku Жыл бұрын
Hearing about the $20k bounty for prettier in rust and then running to chat gpt 4 to ask if it can do it for me 😂😂😂
@littlefreak3000
@littlefreak3000 Жыл бұрын
I can't tell if he is for spaces or tabs....
@dzonialucard
@dzonialucard Жыл бұрын
why just not use webstorm and use the supreme formatter?
@Minolrx
@Minolrx Жыл бұрын
What is that tab manager in the left side sir ???
@static-san
@static-san Жыл бұрын
I was battling some not-very-intelligent re-formatting in prettier the other day and started wondering if maybe Javascript (and Typescript) should import some of the formatting rules as required language structure to reduce the need for formatters.
@dealloc
@dealloc Жыл бұрын
All fine and dandy until you need to store and somehow invalidate that cache in CI (which let's be honest, is the only case why prettier would be considered slow in most of cases). It's the same issues you'd run into when trying to cache node modules across branches, only now you don't have a single place to use as a cache key (i.e. lockfile), but files scattered around. Do you use the diff as cache key? How would that even work?
@moodynoob
@moodynoob Жыл бұрын
Having no cache in CI for Biome isn't an issue - I've formatted 1000s of files in under a second with it, so its overhead is pretty minimal.
@dealloc
@dealloc Жыл бұрын
@@moodynoob Yes, that's what I am saying. Running prettier with a wrapper that provides cache doesn't make it faster in CI. Biome and the like would provide better cold-start time and less memory consumption.
@emptystuff1593
@emptystuff1593 Жыл бұрын
I really don't understand how you can have any difficulty reviewing code that doesn't have the format you're used to. As long as a file doesn't change formatting midway, that's fine, really. I think developers bickering about such things should rethink their priority. Just imagine a firefighter saying, "I couldn't work on that house because the mailbox was on the wrong side of the door".
@Viviko
@Viviko Жыл бұрын
I shall make one called “Sexier”.
@awokawok8453
@awokawok8453 Жыл бұрын
What about "gyaTS"
@sachahjkl
@sachahjkl Жыл бұрын
How hard can it be to parse some text (to an ast) and re output it with the correct whitespaces ?? Am I crazy ?
@chooks2228
@chooks2228 Жыл бұрын
Hopefully that 5% failing is them removing printWidth, god is it such a road blocker from switching away from stylistic ESLint rules
@riceymix4688
@riceymix4688 Жыл бұрын
There is one thing i really wish it will be rewritten for better performance, the ts language server
@dallenbaldwin3484
@dallenbaldwin3484 Жыл бұрын
Which browser is this?
@SSpirite
@SSpirite Ай бұрын
My question is - why prettier should be faster? (It already feels fast enough) Prettier not effecting build times. It runs once per file and modern PC fast enough to do it in a blink of an eye. If it's not - consider to split your 50k+ file.
@juxuanu
@juxuanu Жыл бұрын
NAPI is not "Native API" as you said, it's a project to run Rust code in your JS/TS project.
@cotneit
@cotneit Жыл бұрын
Surprised you didn't mention oxc, my money is on them for this challenge and to take over the JS ecosystem overall
@phyolim5064
@phyolim5064 Жыл бұрын
It already run in a split second.. why does it need to be faster than that? 😅
@priceandpride
@priceandpride Жыл бұрын
Does vjeux actually pronounce the x?
@Salztorte
@Salztorte Жыл бұрын
At work, I had to push prettier really really hard because our lead, do not like the code format that come out of prettier
@gosnooky
@gosnooky Жыл бұрын
I just use eslint for formatting. It works fine, and I don't see the need to use a separate plugin like prettier (which is not nearly configurable enough). I know people say to use eslint for code quality and prettier for formatting, but I've never heard any reason compelling enough to do so. If these tools could be written faster, fair enough, but their speed now doesn't really give me any pause.
@albertgao7256
@albertgao7256 Жыл бұрын
the thing is, i never feel i have performance problem with prettier....ESLint hmm....
@thenewdesign
@thenewdesign Жыл бұрын
What browser is that that you keep exposing the vertical tabs to for a second?
@kearneytaaffe7059
@kearneytaaffe7059 Жыл бұрын
It’s “Arc”. A new browser only for MacOS
@thenewdesign
@thenewdesign Жыл бұрын
​@@kearneytaaffe7059Thanks. Ended up trying it out earlier tonight. Felt clumsy and slow, are there some legit value adds or is it mostly gimmick?
@bdotsamir
@bdotsamir Жыл бұрын
theo is using arc let's fuckin go
@rand0mtv660
@rand0mtv660 Жыл бұрын
5:58 are you sure ESLint team is doing that? Last I've seen the main maintainer of ESLint is pretty adamant to rewrite ESLint in vanilla JS and nothing else. Maybe I missed something or maybe that was just the JavaScript vs TypeScript debate. Regarding Prettier, I never felt like it was a bottleneck in any project I've worked on, but I definitely don't mind a faster tool or better yet a toolchain like Biome that does multiple things at once.
@dhkatz_
@dhkatz_ Жыл бұрын
Time for bun to add a built in formatter and linter 😎😎
@TheNewton
@TheNewton Жыл бұрын
Project formatting shouldn't be enforced on developers it should be near invisible. For teams, rules should be a pre-commit or post-commit step not a local system enforced in-editor mutation on save. The idea that because I use spaces someone else is punished for trying to use tabs, or I can't use leading commas is absurd. We don't make other people use the same system fonts or syntax coloring.
@ivanjermakov
@ivanjermakov Жыл бұрын
Why would you care about a "long tail of formatting logic" is you can do a single format with a new faster tool on a whole project and go from there?
@PieterWigboldus
@PieterWigboldus Жыл бұрын
I have used prettier in the past, but i think a more consistent layout is faster to read. My opinion is that if prettier is useful, most times your code need to restructure. Not to format different, but to restructure code, extract functionality, etc. That is why i dont use it anymore, just eslint with strict rules that will force you to write better code.
@Felice_Enellen
@Felice_Enellen Жыл бұрын
"native languages that perform a bit better" "A bit"? Look, you're either using a glorified scripting language at the speed of molasses, or you're using a native language at the speed of the processor. "A bit" is an understatement, unless the person doing the port writes it _very_ poorly/naïvely.
@sky96line
@sky96line Жыл бұрын
Expectation in 2000: In 2024 we will invent time machine. Reality in 2023: How to format code faster. 😂
@Daniel15au
@Daniel15au Жыл бұрын
"vjeux" isn't pronounced like "veuks". It's pronounced like the French word "jeux" (search KZbin for a pronunciation example), with a v added to the start.
@QueeeeenZ
@QueeeeenZ Жыл бұрын
The biggest issue with Prettier is that it cannot be customized very much, too opinionated.
@BleedingDev
@BleedingDev Жыл бұрын
That is whole point od the tool. :)
@QueeeeenZ
@QueeeeenZ Жыл бұрын
​@@BleedingDevand it sucks
@BleedingDev
@BleedingDev Жыл бұрын
@@QueeeeenZ no, its the Best feature of Prettier. Moře consistency, less configuration. :)
@QueeeeenZ
@QueeeeenZ Жыл бұрын
@@BleedingDev but it's not always possible to get the code to look very pretty with prettier. isn't that the whole point? the code should be pleasant to look at, easy to ready. Prettier fails to do that.
@QueeeeenZ
@QueeeeenZ Жыл бұрын
@@BleedingDevsounds like you're saying that consistency and configuration is more important than pretty code.
@Sindoku
@Sindoku Жыл бұрын
Can we not just run force prettier (and all its dependencies) in the Bun runtime with he -bun flag?
Жыл бұрын
Yo, Theo, what's your browser?
@ronanru
@ronanru Жыл бұрын
It's Arc
Жыл бұрын
@@ronanru thanks 🙏
@ambrodu
@ambrodu Жыл бұрын
What browser are you using ?
@tomasvn09
@tomasvn09 Жыл бұрын
arc browser
@jancarius101
@jancarius101 Жыл бұрын
CTRL+S > CMD+S
@MemeConnoisseur
@MemeConnoisseur Жыл бұрын
I got clickbaited so bad I am ashamed
@___ruthless
@___ruthless Жыл бұрын
Weird, I literally just configured ESLint and Prettier not to clash and then this video popped up Lib is called eslint-config-prettier btw
@lukewestondev
@lukewestondev Жыл бұрын
I use this as well. I have no complaints and it seems to hold up well even with more complicated rule sets like Angulars recommended eslint.
@ShaharHarshuv
@ShaharHarshuv Жыл бұрын
Wait a second. Prettier is not fast enough? It is so much faster than webstorm built-in fomatter, and definetly faster than linters. I never felt like it's too slow.
@mjerez6029
@mjerez6029 Жыл бұрын
Seriously who the hell is having any troubles with prettier speed?
@m4rt_
@m4rt_ Жыл бұрын
While I respect the utility of Prettier, I personally don't see it as "one the most important tools in the past 10 years of software development". Consistent code formatting in a project is important, but there are other tools that I find more important. Also, in my opinion, code formatting is a subjective matter, and adhering to a specific style enforced by Prettier or other tools like it limits the creative expression that programming offers. Programming is an art, allowing people to express themselves through their code, and enforcing a uniform style for all code limits the creativity you can have in programming.
@moodynoob
@moodynoob Жыл бұрын
Having people argue over formatting is such a low stakes issue and time waster that most people rather let a formatter decide. And reviewing PRs is soooo annoying when your team mates don't use a formatter or one with different configuration.
@johanrg70
@johanrg70 Жыл бұрын
We stopped bickering about formatting, everyone is equally unhappy instead. Weeeh!
@reimusklinsman5876
@reimusklinsman5876 Жыл бұрын
Wait. Do people lose time over formatting differences? That sounds so petty. I've lost exactly 0 minutes to this in python because any decent python developer just follows pep8. That is, if you count out time lose getting people to not use black which isn't pep8 compliant
@Toronto_Luddite
@Toronto_Luddite Жыл бұрын
I don't think prettier being an arbitrary formatting arbitration tool makes it important, just decide on some other tool because it Prettier isn't that good of a formatter.
@vladislavkovechenkov8473
@vladislavkovechenkov8473 Жыл бұрын
Yes, this convenience of “format of save” is big. Although I often wonder whether did I developed a bad habit by relying on too much, as I it became a struggle when I need to produce a snippet in an environment without formatters…
@Davidlavieri
@Davidlavieri Жыл бұрын
Thankfully i didn't use prettier for the last 5y and only relied on eslint, which made me code with _style_ right in
@tolstoievski4926
@tolstoievski4926 Жыл бұрын
The problem with those tools is that it completely obfuscates what have been changed in our git history.
@EvHaus
@EvHaus Жыл бұрын
Is it really v-oox? It always pronounced it vee-jeu
@Californ1a
@Californ1a Жыл бұрын
Honestly I've never really liked a lot of the opinions built into prettier's formatting, especially for nested ternaries, and their attitude against adding more options. I've kept using HookyQR's Beautify even though it's no longer maintained since 2019 instead of switching to prettier. I'll probably have to switch to a new formatter at some point, but I'm waiting for something that's more configurable to better fit a customized eslint config. I don't want to have to have an extension like prettier-eslint, that has to run both prettier and then eslint --fix on every save; that's a massively hacky workaround for prettier not wanting to add config options.
@Ruhigengeist
@Ruhigengeist Жыл бұрын
But Prettier is so bad though. I hate that it uses line length as a core heuristic. I HATE that it will wrap some code when it just barely crosses the line length threshold, it makes consecutive lines that should look similar, look different. For example two useState on consecutive lines, one with short var names and the other with long var names, it will wrap the default param at the end on the second one but not the first, making it look unbalanced. And no, making the line length a big number is not a solution, because then prettier will just start _unwrapping_ lines instead! I hate it so, so much. Prettier is banned from all projects I maintain. It causes more friction than it helps because it has rules and behaviour that aren't configurable. Compare with go fmt and such which do a perfect job _without_ line length/wrapping. I wish that could be the goal, instead of getting test parity with prettier.
@static-san
@static-san Жыл бұрын
I've been known to rewrite code to get around how prettier thinks it should be formatted. Not real proud of that...
@TheNewton
@TheNewton Жыл бұрын
Because project formatting should not exist at the developer formatting level. And developers shouldn't care about the project-formatting once they checkout it out it's formatted to what they locally need. web-dev has gotten itself so twisted up.
@0xbyt3z
@0xbyt3z Жыл бұрын
i am not gonna use anything else
@travisueki1789
@travisueki1789 Жыл бұрын
Can’t see it
@Grom1477
@Grom1477 Жыл бұрын
Plugins would be written in js anyway
@TheNewton
@TheNewton Жыл бұрын
just cache with javascript is such a cute lil mid-take, oh..sweety what's that? it improves performance uh huh.. sure honey. Now show us that compared to a rust version that also has a cache.
@RamkrishanYT
@RamkrishanYT Жыл бұрын
Steps 1. No JS Prettier 2. No JS Linter 3. No JS
@vaisakh_km
@vaisakh_km Жыл бұрын
I see a great win
@martijn3151
@martijn3151 Жыл бұрын
When saving a file, within a few tenths of a second the file is formatted. So, why again do we need a much faster prettier?
Separations of Concerns is a Lie
8:50
Theo - t3․gg
Рет қаралды 56 М.
The Truth About Code Performance (Sorry Prime)
20:03
Theo - t3․gg
Рет қаралды 122 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
I Hate CORS.
7:52
Theo - t3․gg
Рет қаралды 75 М.
Prettier/ESLint to Biome: The Lightning-Fast Rust-Based Tool!
11:14
Why You Should Be Using PostHog
15:51
Nathan Covey
Рет қаралды 3,8 М.
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 738 М.
How programmers flex on each other
6:20
Fireship
Рет қаралды 2,6 МЛН
You Probably Shouldn't Use React.memo()
10:17
Theo - t3․gg
Рет қаралды 59 М.
Rethinking The Linter
19:26
Theo - t3․gg
Рет қаралды 78 М.
Bun1.1 Released!
30:29
ThePrimeTime
Рет қаралды 88 М.
Cool Tools I’ve Been Using Lately
23:11
Theo - t3․gg
Рет қаралды 380 М.
We Need To Talk About Ternaries
19:09
Theo - t3․gg
Рет қаралды 80 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН