The Quest To Destroy Prettier

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 227

  • @zactron1997
    @zactron1997 Год назад +136

    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 Год назад +3

      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 Год назад +3

      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 Год назад +23

      ​@@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.

  • @abots
    @abots Год назад +243

    Making prettier faster is definitely something I didn't see happening in 2023...

    • @modernkennnern
      @modernkennnern Год назад +22

      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 Год назад +1

      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 Год назад +10

      @@modernkennnern I'm assuming it can be relevant if you have a huge codebase

    • @guanbo-yang
      @guanbo-yang Год назад +7

      ​@@asdfghyter People won't change the whole codebase in a single commit, and I think we usually only need to prettify the modified part

  • @Adelphos0653
    @Adelphos0653 Год назад +26

    My company switched to Rome/biome and haven't looked back. It's been fantastic

  • @NotBlackyy
    @NotBlackyy Год назад +10

    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 Год назад +1

      i believe ruff's formatter was initially based on biome's formatter infrastructure

  • @MichiganTypeScript
    @MichiganTypeScript Год назад +33

    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 Год назад +3

      Careful he'll make a half hour "reaction" video

    • @offroaders123
      @offroaders123 Год назад

      Hey, I know you from somewhere 🕵🏼‍♂️

  • @jacksonbourne
    @jacksonbourne Год назад +24

    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 Год назад +1

      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 11 месяцев назад

      @@TheNewton just imagine how much memory it will use

  • @KieranTully
    @KieranTully Год назад +12

    By Xargs -p they presumably mean parallel processing - use xargs to spawn multiple copies of prettier working on different files in parallel.

  • @edumorango
    @edumorango Год назад +11

    I could swear you would add Summoning Salt theme this time around 😂

    • @t3dotgg
      @t3dotgg  Год назад +3

      The video was edited before I came up with the title 🤣 next time!

    • @macienrique
      @macienrique Год назад +2

      My 2 favorite topics, speedrunning and programming

  • @ronanru
    @ronanru Год назад +24

    You should have put is-odd or leftpad as other dependencies on the thumbnail.

    • @t3dotgg
      @t3dotgg  Год назад +13

      God damn this is a good idea

  • @weeb3277
    @weeb3277 Год назад +2

    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.

  • @hugazo
    @hugazo Год назад +2

    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.

  • @ennioVisco
    @ennioVisco Год назад +1

    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

  • @enriquedlc2d
    @enriquedlc2d Год назад +4

    Currently using biome for my side projects, easier to configure and faster than prettier/eslint

  • @14arjun14
    @14arjun14 Год назад +10

    I'm very disappointed with the clickbaity video title

  • @radomane
    @radomane Год назад +3

    dartfmt is the goat of having a built in formatter in the language

  • @dinckelman
    @dinckelman Год назад +12

    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 Год назад +7

      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 Год назад +2

      @@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

  • @voidmind
    @voidmind Год назад +5

    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.

  • @ggandalff
    @ggandalff Год назад +31

    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 Год назад +1

      Because there's too many new ideas all the time

    • @PaulSebastianM
      @PaulSebastianM Год назад +1

      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 Год назад +1

      @@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

  • @belgac
    @belgac Год назад +1

    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

  • @Jonas-Seiler
    @Jonas-Seiler Год назад +18

    why exactly do we need this performance increase

    • @sujeet4410
      @sujeet4410 Год назад +10

      LMAO Yess ... Never have I thought "Why's prettier slow?"

  • @ninhdang1106
    @ninhdang1106 Год назад

    Left side tab bar is sick ngl

  • @qwelias
    @qwelias 11 месяцев назад +1

    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

  • @Tszyu01
    @Tszyu01 Год назад +18

    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 11 месяцев назад +2

      I'd assume no, but it makes for a great clickbait video topic!

  • @snerpletiger8761
    @snerpletiger8761 Год назад +2

    ! have no idea what u are talking about but I love the mustache!

  • @Sindoku
    @Sindoku Год назад +5

    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

  • @JaeTLDR1
    @JaeTLDR1 Год назад +5

    Prettier has so many awful rules. Like pep anything not dictated by the language is going to be messy.

  • @cristopher5837
    @cristopher5837 Год назад +11

    You can try ESLint Stylistic too, not a 1:1 capabilities compared to Prettier, but hey it still gets the job done

    • @ronanru
      @ronanru Год назад +5

      Pretty sure Theo did a rant about why styling with eslint is a bad idea

    • @ronanru
      @ronanru Год назад +1

      ruclips.net/video/Cd-gBxzcsdA/видео.html

    • @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)

  • @gFamWeb
    @gFamWeb Год назад +2

    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 11 месяцев назад

      why is that confusing? this speaks for the language, no?

    • @gFamWeb
      @gFamWeb 11 месяцев назад +1

      @@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 11 месяцев назад +1

      ​​@@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.

  • @harmkraats
    @harmkraats Год назад

    I like you are using Arc as your browser :)

  • @somenamesome
    @somenamesome Год назад +26

    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 Год назад +3

      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 Год назад +3

      @@RajinderYadavsounds like someone doesn't know all the problems exclusively caused by typescript

    • @somenamesome
      @somenamesome Год назад +2

      @@RajinderYadav Typescript doesn't exist at runtime

  • @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.

  • @Sindoku
    @Sindoku Год назад +1

    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 😂😂😂

  • @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

  • @guyaaa-zf2zz
    @guyaaa-zf2zz Год назад +3

    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 9 месяцев назад

      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.

  • @Viviko
    @Viviko Год назад +9

    I shall make one called “Sexier”.

  • @Z4KIUS
    @Z4KIUS 7 месяцев назад

    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

  • @tobiasnickel3750
    @tobiasnickel3750 Год назад +1

    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.

  • @cefnhoile
    @cefnhoile Год назад +6

    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 Год назад +3

      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 Год назад +2

      @@moodynoob Format only staged files?

    • @superchupu
      @superchupu Год назад +1

      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

  • @SanyaJuutilainen
    @SanyaJuutilainen 11 месяцев назад

    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.

  • @cotneit
    @cotneit Год назад +1

    Surprised you didn't mention oxc, my money is on them for this challenge and to take over the JS ecosystem overall

  • @EditioCastigata
    @EditioCastigata Год назад +2

    Chosing Rust is misleading. Other languages, such as the mentioned Go, would make working on the solution more accessible.

  • @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.

  • @dhkatz_
    @dhkatz_ Год назад

    Time for bun to add a built in formatter and linter 😎😎

  • @Captain.Mystic
    @Captain.Mystic 11 месяцев назад

    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.

  • @riceymix4688
    @riceymix4688 Год назад

    There is one thing i really wish it will be rewritten for better performance, the ts language server

  • @chooks2228
    @chooks2228 Год назад +1

    Hopefully that 5% failing is them removing printWidth, god is it such a road blocker from switching away from stylistic ESLint rules

  • @bdotsamir
    @bdotsamir Год назад

    theo is using arc let's fuckin go

  • @albertgao7256
    @albertgao7256 Год назад

    the thing is, i never feel i have performance problem with prettier....ESLint hmm....

  • @PieterWigboldus
    @PieterWigboldus 11 месяцев назад +2

    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.

  • @NorthernChimp
    @NorthernChimp Год назад +1

    The concern I felt reading the title 😟

  • @sky96line
    @sky96line Год назад

    Expectation in 2000: In 2024 we will invent time machine.
    Reality in 2023: How to format code faster.
    😂

  • @bagheldevansh
    @bagheldevansh Год назад +2

    video on arc browser soon?

  • @johanrg70
    @johanrg70 Год назад

    We stopped bickering about formatting, everyone is equally unhappy instead. Weeeh!

  • @emptystuff1593
    @emptystuff1593 11 месяцев назад

    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".

  • @jancarius101
    @jancarius101 Год назад +1

    CTRL+S > CMD+S

  • @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.

  • @idavidgeo
    @idavidgeo Год назад +1

    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 Год назад +2

      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.

  • @___ruthless
    @___ruthless Год назад +4

    Weird, I literally just configured ESLint and Prettier not to clash and then this video popped up
    Lib is called eslint-config-prettier btw

    • @lukeweston1234
      @lukeweston1234 Год назад

      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.

  • @Salztorte
    @Salztorte 10 месяцев назад

    At work, I had to push prettier really really hard because our lead, do not like the code format that come out of prettier

  • @m4rt_
    @m4rt_ Год назад +3

    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 Год назад +4

      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.

  • @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.

  • @QueeeeenZ
    @QueeeeenZ Год назад +5

    The biggest issue with Prettier is that it cannot be customized very much, too opinionated.

    • @BleedingDev
      @BleedingDev Год назад +2

      That is whole point od the tool. :)

    • @QueeeeenZ
      @QueeeeenZ Год назад +1

      ​@@BleedingDevand it sucks

    • @BleedingDev
      @BleedingDev Год назад +2

      @@QueeeeenZ no, its the Best feature of Prettier. Moře consistency, less configuration. :)

    • @QueeeeenZ
      @QueeeeenZ Год назад +2

      @@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.

  • @ruaidhrilumsden
    @ruaidhrilumsden Год назад +2

    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 Год назад +1

      @@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.

  • @static-san
    @static-san Год назад +1

    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.

  • @gosnooky
    @gosnooky Год назад +1

    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.

  • @juxuanu
    @juxuanu Год назад

    NAPI is not "Native API" as you said, it's a project to run Rust code in your JS/TS project.

  • @mjerez6029
    @mjerez6029 Год назад

    Seriously who the hell is having any troubles with prettier speed?

  • @LusidDreaming
    @LusidDreaming Год назад +1

    What is this Cmd+S? Does he mean :w?

  • @Requiem100500
    @Requiem100500 11 месяцев назад

    Pretty sure you don't need a bounty to rewrite something in Rust. Rust evangelists will gladly do it for free.

  • @MemeConnoisseur
    @MemeConnoisseur Год назад

    I got clickbaited so bad I am ashamed

  • @Felice_Enellen
    @Felice_Enellen Год назад +1

    "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.

  • @littlefreak3000
    @littlefreak3000 Год назад

    I can't tell if he is for spaces or tabs....

  • @dealloc
    @dealloc Год назад +1

    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.

  • @tolstoievski4926
    @tolstoievski4926 Год назад

    The problem with those tools is that it completely obfuscates what have been changed in our git history.

  • @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

  • @Sindoku
    @Sindoku Год назад

    Can we not just run force prettier (and all its dependencies) in the Bun runtime with he -bun flag?

  • @Californ1a
    @Californ1a Год назад +2

    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.

  • @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.

  • @phyolim5064
    @phyolim5064 Год назад

    It already run in a split second.. why does it need to be faster than that? 😅

  • @najlepszyinformatyk1661
    @najlepszyinformatyk1661 Год назад

    Is stupid to solve problem that doesn't exist :)

  • @Grom1477
    @Grom1477 Год назад

    Plugins would be written in js anyway

  • @minor12828
    @minor12828 Год назад

    What is that tab manager in the left side sir ???

  • @0xbyt3z
    @0xbyt3z Год назад

    i am not gonna use anything else

  • @ConnorMoody
    @ConnorMoody Год назад

    20k to make prettier in rust? Challenge accepted

  • @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 ?

  • @Daniel15au
    @Daniel15au 11 месяцев назад

    "vjeux" isn't pronounced like "veuks". It's pronounced like the French word "jeux" (search RUclips for a pronunciation example), with a v added to the start.

  • @dzonialucard
    @dzonialucard Год назад

    why just not use webstorm and use the supreme formatter?

  • @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.

  • @travisueki1789
    @travisueki1789 Год назад +1

    Can’t see it

  • @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?

  • @seasong7655
    @seasong7655 Год назад

    20K? I better start learning Rust then 😅

  • @Ruhigengeist
    @Ruhigengeist Год назад +7

    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 Год назад +1

      I've been known to rewrite code to get around how prettier thinks it should be formatted. Not real proud of that...

    • @TheNewton
      @TheNewton Год назад +1

      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.

  • @Malix_Labs
    @Malix_Labs Год назад +1

    Oui c'est bien vrai

  • @Toronto_Luddite
    @Toronto_Luddite Год назад +1

    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.

  • @dallenbaldwin3484
    @dallenbaldwin3484 Год назад

    Which browser is this?

  • @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?

  • @RamkrishanYT
    @RamkrishanYT Год назад

    Steps
    1. No JS Prettier
    2. No JS Linter
    3. No JS

  • @priceandpride
    @priceandpride Год назад

    Does vjeux actually pronounce the x?

  • @RajinderYadav
    @RajinderYadav Год назад

    What are you people writting that running pritter takes too much time? 😂 I've used it in corporations and I didn't even nothing any delays. Also re-writting this is rust is a bad idea, Go would be good language. It's fast and easy to learn and as a result any project developed with it would be easier to maintain. Rust is C++ dog food.

  • @ambrodu
    @ambrodu Год назад

    What browser are you using ?