mandrasch, to random
@mandrasch@social.tchncs.de avatar

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

#ECMAScript #JavaScript #Prettier

janriemer, to rust

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

https://github.com/biomejs/biome

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

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

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

Time to switch our tools! 🚀

xahteiwi, to markdown
@xahteiwi@mastodon.social avatar

Hivemind, please help.

One thing that still eludes me is a way to lint files to enforce a one-sentence-per-line rule. This is remarkably nontrivial.

Can somebody point me to such a thing? Ideally in , but I'll take any language (even an emacs minor mode will help).

A bajillion bonus points if the thing can also unwrap wrapped paragraphs and automatically turn them into one sentence per line.

Boosts appreciated, thanks!

https://sive.rs/1s

lil5,
@lil5@fosstodon.org avatar

@xahteiwi

is my go to for formatting files

  • It does code formatting inside md code blocks
  • Renumbering sorted lists
  • Adds table spacing
  • Adheres to .editorconfig configuration

https://prettier.io/blog/2017/11/07/1.8.0.html

alexleduc, to javascript
@alexleduc@mstdn.ca avatar

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

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

#ECMAScript #JavaScript #Prettier

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

brawaru, (edited ) to javascript
@brawaru@mstdn.social avatar

developers, do you think should be a part of the build process?

I've seen quite a few projects use and plugins to run ESLint during their build process. This both shows a huge error overlay when there are linting errors, and halts the build when building for production.

However, I never understood that, as linting does not really ensure validity of the code, but rather that it aligns to some stylistic rules.

What do y'all think about this?

brawaru,
@brawaru@mstdn.social avatar

To expand on the above, while #ESLint may prevent some errors (e.g. missed React dependency or such), it usually doesn't ensure that your code is valid and ready to run. Therefore, I think ESLint, just like #Prettier, should be only present as a plugin in your IDE and separate script in a package.

I would even go as far as to say that ESLint during the build is harmful and slows you down, as it can error for silly things like spaces, that do not affect the result of your code whatsoever.

stvfrnzl, to node
@stvfrnzl@mastodon.online avatar

Hey @astro, I tried running a brand new Astro project with but there seems to be an issue when installing the dependencies?

When running "npm run dev" it cannot find the "astro" command. When installing it with everything works fine and as expected (no error during dependency install). 🤷‍♂️

Screenshot of text prompts during the installation process of Astro with yarn. No errors, everything going smooth!

stvfrnzl, (edited )
@stvfrnzl@mastodon.online avatar

@astro Also #prettier doesn't recognize Astro files anymore when using #VisualStudioCode? Tested it with a version 2 Astro project and it works as expected...

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

#vue #nuxt #vscode #prettier #eslint #webdev

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

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

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

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.

pepelsbey, to random
@pepelsbey@mastodon.social avatar

Just a quote from some spec repository I’d like to co-sign:

> Prettier tends to make some ugly formatting for HTML, so it's still excluded

kytta,
@kytta@fosstodon.org avatar

@marcamos @pepelsbey just curious, what don't you like about it? I find it quite good, and I like the way it splits tags to put every attribute on its own line (= better git diffs) and to conserve spaces / the lack thereof. The only problem I have with #Prettier (across all languages) is the fact that it collapses the multi-line structures if there is space, which I almost never want.

mvsde, to random
@mvsde@mastodon.social avatar

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

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

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/

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