# How do you format CSS and JavaScript/TypeScript with \`mix format\`?

**URL:** <https://forum.elixirforum.com/t/how-do-you-format-css-and-javascript-typescript-with-mix-format/65733>\
**Category:** Questions\
**Tags:** formatter, formatting, mix-format\
**Created:** [August 28, 2024, 8:53pm UTC](https://forum.elixirforum.com/t/how-do-you-format-css-and-javascript-typescript-with-mix-format/65733 "2024-08-28T20:53:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ibarch](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ibarch/32/4469_2.png) [@ibarch](https://forum.elixirforum.com/u/ibarch)\
**Post date:** [August 28, 2024, 9:48pm UTC](https://forum.elixirforum.com/t/how-do-you-format-css-and-javascript-typescript-with-mix-format/65733/3 "2024-08-28T21:48:21Z")

</div>

For JS, TS and JSON files the modern formatter is [Biome](https://biomejs.dev). The team behind Biome is [still working on CSS support](https://github.com/biomejs/biome/issues/1285). Until that’s complete, you can format CSS files with [Prettier](https://prettier.io) - the legacy tool Biome is intended to replace.  
Both of these tools can be installed with `npm` inside `/assets` directory and executed with `mix`, e.g.:

```elixir
defp aliases do
  [
    "assets.format-js": [
      "cmd --cd assets/ npx @biomejs/biome format scripts/ --write"
    ],
    "assets.format-css": [
      # similar command for Prettier and /styles dir
    ],
    "format-all": ["format", "assets.format-js", "assets.format-css"]
  ]
end

```

---

_[View the full topic](https://forum.elixirforum.com/t/how-do-you-format-css-and-javascript-typescript-with-mix-format/65733)._
