Deno: Auto Format JavaScript Code
Auto Format Code
deno fmt filename
Disable Auto Format for Code Block
to tell deno not to format a semantic unit of code, add
// deno-fmt-ignore
to the line above it.
// deno-fmt-ignore const x = 123;
Disable Auto Format for Whole File
add to the top of file
// deno-fmt-ignore-file
deno format cannot have 0 indent.
- computer science, web dev, deno JavaScript.
- very annoying, that deno format cannot have 0 indent.
deno fmt --indent-width 0- that is, in html, you have lots nested tags. you don't want indentation.
interesting, here brave search ai got the correct answer. but grok got it wrong, even when asking it to make sure. prompt for both is:
deno --indent-width 0