For JS, TS and JSON files the modern formatter is Biome. The team behind Biome is still working on CSS support. Until that’s complete, you can format CSS files with Prettier - 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.:
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


















