Skip to main content
On this page

Config files

You can configure Deno using a deno.json file. This file can be used to configure the TypeScript compiler, linter, formatter, and other Deno tools.

The configuration file supports .json and .jsonc extensions.

Deno will automatically detect a deno.json or deno.jsonc configuration file if it's in your current working directory or parent directories. The --config flag can be used to specify a different configuration file.

package.json support Jump to heading

For compatibility with Node.js projects, Deno also reads an existing package.json. You don't need to add a deno.json to run a Node project: Deno resolves the project's dependencies from package.json, and you can run its scripts with deno task.

A package.json is not, however, a way to configure Deno itself. Deno-specific settings such as the linter, formatter, TypeScript compiler options, and lockfile are read only from deno.json. When both files are present, Deno reads dependencies from each and uses deno.json for its own configuration.

Read more about Node compatibility in Deno.

What you can configure Jump to heading

A deno.json file configures Deno's tooling and your project. Every field is documented in the Configuration file (deno.json) reference, including:

See the reference for a full example deno.json file and the JSON schema for editor autocompletion.

Last updated on

Did you find what you needed?

Edit this page
Privacy policy