mandrasch, to random

How many years 'till this dream will be reality? 🤓

"it would be great if twig had an up-to-date formatter (maybe with a prettier plugin maintained by core team)"

https://github.com/twigphp/Twig/issues/3951#issuecomment-1867350656

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

Prettier 3.2: Support JSONC and Angular’s ICU expression
https://prettier.io/blog/2024/01/12/3.2.0.html

janriemer, to rust

biome | A toolchain for web projects, aimed to provide functionalities to maintain them. #Biome offers #formatter and #linter, usable via CLI and LSP.

https://github.com/biomejs/biome

Fun fact: this is the winner of the "write a pretty printer in #Rust challenge":
https://console.algora.io/challenges/prettier

I think, by now, every major #WebDev tool has been rewritten in #RustLang.

Just think about the time savings this brings for people globally!

Time to switch our tools! 🚀

#RIIR #JavaScript #DevTools #Prettier

alexleduc, to javascript

I had to get this off my chest: Opinionated code formatters suck #javascript #prettier #biome #eslint https://dev.to/alexleduc76/opinionated-code-formatters-suck-3b1

mkhoury,

@alexleduc ah you're right, I thought it was more open than that. I might have been confusing it with a linter.

I agree that bringing Prettier into an existing codebase is usually a recipe for friction. I do like the idea of enforcing the code style automatically to let devs stay in the flow and not worry about style. I remember onboarding it as part of some other change (TypeScript, Angular, Nest) so that the old code was untouched knowing (thinking) that it would eventually all be ported.

alexleduc,

@mkhoury Don't get me wrong, I also like the idea of enforcing code style automatically in my projects, I just do it with ESLint instead of Prettier.

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, (edited ) to javascript
@ecmascript_news@mastodon.online avatar

Prettier 3.1: New experimental ternaries formatting and Angular control flow syntax
https://prettier.io/blog/2023/11/13/3.1.0

stvfrnzl, to SEO
@stvfrnzl@mastodon.online avatar

A couple days ago I created a very opinionated for @astro, check it out: https://astro-naut-template.vercel.app/

It comes with a couple neat things, like , , & config, hooks, @andy famous and more!

Hope this helps whoever is creating websites with , any feedback appreciated.🤗

lyokolux,
@lyokolux@fosstodon.org avatar

@stvfrnzl @astro @andy It's cool to see such demo with only 20kB of data transferred :)

As best practices:

  • the astronaut logo can be optimized a bit further from 5.8kB to 3.99kB with https://jakearchibald.github.io/svgomg/
  • it seems the light and dark version are downloaded, even if I am only on the dark theme
stvfrnzl,
@stvfrnzl@mastodon.online avatar

@lyokolux @astro @andy Thanks for your feedback and taking the time to investigate! I’ll look into it 👀

felixthehat, to javascript

does anyone know how to prevent my attributes from formatting into a single line when saving my vue components?

I long ago lost the battle against prettier/eslint/vscode and just tend to leave it to it but I find this particularly irritating

a screen recording showing my nicely formatted vue component with attributes on single lines, turned into a long, single line on save :(

voxpelli,
@voxpelli@mastodon.social avatar

@felixthehat That should be a Prettier thing, search in settings for “format”, “format on save” or simply just “save”

Also: Important to note whether the setting is set in the workspace or on your user, as workspace overrides user

cr0ybot, to javascript
@cr0ybot@mastodon.social avatar

Someone on Twitter that I respect made the insinuation that I'm a bigot for preferring single quotes in my #Prettier config...

The argument is that the majority of all programming languages don't support single quotes, and if you personally don't have an opinion (setting aside the fact that I do have a preference), you should consider the opions of others.

I can admit when I haven't thought through something and need to change my stance, but this was a bit bizarre. Thought?

#JavaScript

cr0ybot,
@cr0ybot@mastodon.social avatar

@chris I'm not sure if you know who they are or not, but I'm trying to give them the benefit of the doubt since I've seen them piled on before. So I'm sure they have little patience for twitter arguments.

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
schizanon, to webdev

Today's my first day trying .

Not sure how I feel about the built in and formatter yet; me and are besties, and I have gotten used to

Still gonna give it a try.

mvsde, to random
@mvsde@mastodon.social avatar

deprecated all stylistic rules and is also kinda moving in that direction.

Maybe it’s finally time to take a look at ? 🤔

But I definitely have to configure it so code stays readable and doesn’t become this mess of seemingly random line breaks.

Ever looked at what Prettier does to JS template literals? It’s certainly something 😬

https://stylelint.io/migration-guide/to-15

voxpelli,
@voxpelli@mastodon.social avatar

@mvsde I’ll probably go with #dprint instead of #prettier if I go beyond what #eslint still supports stylistically.

dprint feels as un-opinionated and configurable as ESLint whereas Prettier is quite opinionated.

Looked at it? https://dprint.dev/

mvsde,
@mvsde@mastodon.social avatar

@voxpelli That looks interesting, thanks for the recommendation 👍🏻

I’ll definitely check it out.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • cisconetworking
  • khanakhh
  • mdbf
  • magazineikmin
  • modclub
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • Durango
  • tacticalgear
  • megavids
  • ngwrru68w68
  • everett
  • tester
  • cubers
  • normalnudes
  • thenastyranch
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • lostlight
  • All magazines