Tailwind CSS: Automatic Class Sorting with Prettier

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • biome

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

  • Biome [0], a fast Prettier-compatible formatter, is currently working on adding class sorting [1]. We expect to ship the feature with the next release (on February). We are discussing which options to provide for the feature (mainly on the Discord of Biome).

    [0] https://biomejs.dev/

  • prettier

    Prettier is an opinionated code formatter.

  • "Multiple competing options" ignores that there's a prevalent style already.

    https://github.com/prettier/prettier/issues/840#issuecomment...

    Consistency has more value than the subjective advantage of the proposal that you're comparing to the objective advantage of being phonetic. I think the prettier maintainers made the right choice.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • prettier-plugin-sort-imports

    A prettier plugin to sort imports in typescript and javascript files by the provided RegEx order.

  • In a similar vein, you can sort imports with Prettier using Trivago’s plugin.

    https://github.com/trivago/prettier-plugin-sort-imports

  • prettier-plugin-void-html

    Use the void tag syntax

  • React popularized it, and in its context having self-closing tags on React elements to indicate leaf nodes makes a lot of sense. Prettier just went with that and also does it for HTML.

    I'm wondering why you are so triggered by that issue that you have to bring it up in a context where its off-topic (it could be brought up on any post related to Prettier).

    The validator Wiki page even highlights that it's essentially a non-issue, except for interactions with unquoted attributes, which Prettier also converts to quoted attributes, so that interaction never happens. The other reason is for "teaching the wrong" mental model, which I guess is fair from the position of MDN, but Prettier was never designed as a "teaching formatter".

    And if you, even with all that context want to opt-out of that formatting, there is a community-maintained plugin that adjusts the formatting to how you want it: https://github.com/awmottaz/prettier-plugin-void-html

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Fastest Frontend Tools in 2022

    13 projects | dev.to | 4 Oct 2022
  • Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout – WebKit

    5 projects | news.ycombinator.com | 23 Apr 2024
  • Biome.js : Prettier+ESLint killer ?

    3 projects | dev.to | 18 Apr 2024
  • Biome – fast JavaScript linter and formatter

    1 project | news.ycombinator.com | 8 Apr 2024
  • Collab Lab #66 Recap

    7 projects | dev.to | 7 Apr 2024