summaryrefslogtreecommitdiff
path: root/tests/specs/fmt
AgeCommit message (Collapse)Author
2024-11-19feat(fmt): support SQL (#26750)João Baptista
This commit adds support for .sql files in "deno fmt" subcommand. Closes: https://github.com/denoland/deno/issues/25024 --------- Signed-off-by: m4rc3l05 <15786310+M4RC3L05@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-18feat: fmt and lint respect .gitignore file (#26897)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/26573
2024-11-06fix(fmt): don't use self-closing tags in HTML (#26754)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/26748
2024-11-04fix(fmt): ignore file directive for YAML files (#26717)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/26712 Support `# deno-fmt-ignore-file` directive for YAML files. Also added tests for single line ignores.
2024-09-26refactor(fmt): rewrite HTML syntax error handling (#25892)Bartek Iwańczuk
2024-09-25feat(fmt): better error on malfored HTML files (#25853)Bartek Iwańczuk
Improves syntax errors for HTML formatter. `broken.html` ```html <div class=container > content ``` ``` $ deno fmt broken.html Error formatting: /Users/ib/dev/deno/tests/specs/fmt/html/broken.html syntax error 'expect close tag' at line 3, column 0 Checked 1 file ``` ``` $ ./target/debug/deno fmt broken.html Error formatting: /Users/ib/dev/deno/tests/specs/fmt/html/broken.html Syntax error (expect close tag) at file:///Users/ib/dev/deno/tests/specs/fmt/html/broken.html:3:0 Checked 1 file ```
2024-09-24fix(fmt): --check was broken for CSS, YAML and HTML (#25848)Bartek Iwańczuk
`deno fmt --check` was broken for CSS, YAML and HTML files. Before this PR, formatting any of these file types would return a string, even though the contract in `cli/tools/fmt.rs` is to only return a string if the formatting changed. This causes wrong flagging of these files as being badly formatted even though diffs showed nothing (because they were in fact formatted properly). Closes https://github.com/denoland/deno/issues/25840
2024-09-23feat(fmt): support vto and njk extensions (#25831)Óscar Otero
Fixes #25802 markup_fmt plugin supports some HTML-like formats like Angular, Jinja, Twig, Nunjucks or Vento, that are not supported by `deno fmt`. This PR adds support for the extensions `njk` (Nunjucks) and `vto` (Vento). Angular doesn't have a custom extension (it uses `html` afaik) and Jinja and Twig are template engines written in Python and PHP respectively so it doesn't make sense to be supported by Deno.
2024-09-23feat(fmt): stabilize CSS, HTML and YAML formatters (#25753)Bartek Iwańczuk
This commits stabilizes CSS, HTML and YAML formatters in `deno fmt`. It is no longer required to use either of these flags: - `--unstable-css` - `--unstable-html` - `--unstable-yaml` Or these `unstable` options in the config file: - `fmt-css` - `fmt-html` - `html-yaml`
2024-09-19fix: don't include extensionless files in file collection for lint & fmt by ↵Leo Kettmeir
default (#25721) When using the `ext` flag, it will still attempt formatting them with the provided extension
2024-09-18feat: default to TS for file extension and support ext flag in more ↵Leo Kettmeir
scenarios (#25472) Closes #11220 Currently does lint, fmt, and repl
2024-09-10fix: update malva in deno to support astro css comments (#25553)HasanAlrimawi
This PR addresses issue #25534 **Code Changes** - Updated malva version to the latest in cli/Cargo.toml. - Updated LanguageOptions to match new Malva config. - Added test case same as the issue to assure changes success.
2024-08-14feat(fmt): support HTML, Svelte, Vue, Astro and Angular (#25019)Pig Fang
This commit adds capability to format HTML, Svelte, Vue, Astro and Angular files. "--unstable-html" is required to format HTML files, and "--unstable-component" flag is needed to format other formats. These can also be specified in the config file. Close #25015
2024-08-09feat(fmt): support CSS, SCSS, Sass and Less (#24870)Pig Fang
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 ```
2024-08-02feat(unstable/fmt): move yaml formatting behind unstable flag (#24848)David Sherret
This moves YAML formatting behind an unstable flag for Deno 1.46. This will make it opt-in to start and then we can remove the flag to make it on by default in version of Deno after that. This can be specified by doing `deno fmt --unstable-yaml` or by specifying the following in a deno.json file: ```json { "unstable": ["fmt-yaml"] } ```
2024-07-04feat: npm workspace and better Deno workspace support (#24334)David Sherret
Adds much better support for the unstable Deno workspaces as well as support for npm workspaces. npm workspaces is still lacking in that we only install packages into the root node_modules folder. We'll make it smarter over time in order for it to figure out when to add node_modules folders within packages. This includes a breaking change in config file resolution where we stop searching for config files on the first found package.json unless it's in a workspace. For the previous behaviour, the root deno.json needs to be updated to be a workspace by adding `"workspace": ["./path-to-pkg-json-folder-goes-here"]`. See details in https://github.com/denoland/deno_config/pull/66 Closes #24340 Closes #24159 Closes #24161 Closes #22020 Closes #18546 Closes #16106 Closes #24160
2024-04-01fix: prevent cache db errors when deno_dir not exists (#23168)David Sherret
Closes #20202