feat(fmt): support CSS, SCSS, Sass and Less (#24870)

This PR integrates [Malva](https://github.com/g-plane/malva) into `deno
fmt`, which introduces the ability to format CSS, SCSS, Sass and Less
files.

On Linux x64 6.10, this PR increases about 800KiB:

```                                                                                                                                                                      
❯ wc -c target/release/deno
125168728 target/release/deno

❯ wc -c target/release/deno
124349456 target/release/deno
```
This commit is contained in:
Pig Fang 2024-08-10 00:52:23 +08:00 committed by GitHub
parent 218ee1b1ff
commit 82884348cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 235 additions and 10 deletions

View file

@ -1368,6 +1368,9 @@ impl Inner {
.data_for_specifier(&specifier)
.map(|d| &d.member_dir.workspace);
let unstable_options = UnstableFmtOptions {
css: maybe_workspace
.map(|w| w.has_unstable("fmt-css"))
.unwrap_or(false),
yaml: maybe_workspace
.map(|w| w.has_unstable("fmt-yaml"))
.unwrap_or(false),