TIL is my collection of short, technical daily learnings. 265 and counting.
Prettier in Fenced Code Blocks
Prettier formats code in fenced code blocks! When I type three backticks and then a code, Prettier evaluates the code in the block and tries to format it per my global .prettierrc. I produce a lot of technical writing in markdown. I’ve often wondered if my fenced code blocks are valid, since I sometimes type them by hand. With Prettier, as long as I add a language identifier (e.g. typescript), that language is supported and configured for Prettier autoformatting, it will run on the block. ...