How to add dev-only dependencies in Deno?

In Node.js, we can use npm install -D to install a dev-only dependency, adding into package.json > devDependencies. When my package is published and used as a dependency, dev-only dependencies won’t be installed.

But in deno.json, there is only imports, no devImports. According to Deno v2 RC announcement, we can use deno add --dev. But this only add contents to deno.lock, not adding anything to deno.json. I tried deno add --dev eslint (not migrating Deno Lint yet), but it complained eslint: command not found.

I found denoland/deno#26865, but no answers are there.