Formatting and Linting

Learn to format code and check for warnings and errors in Deno.


To format Deno’s code, the CLI provides the fmt command. This is an opinionated formatter that aims to solve any questions regarding code formatting. The main goal is for developers not to have to care about the format of their code—not when writing code nor when reviewing pull requests.

Running the following command with no argument formats all the files in the current directory:

Get hands-on with 1200+ tech skills courses.