Skip to content

Commit 2d7974f

Browse files
docs: document how to exclude files from deno check (#3125)
Co-authored-by: lunadogbot <lunadogbot@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
1 parent 00d09f4 commit 2d7974f

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

runtime/reference/cli/check.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,31 @@ Check multiple files:
2525
deno check src/server.ts src/utils.ts
2626
```
2727

28+
## Scoping and excluding files
29+
30+
You can pass directories or globs as positional arguments to type-check a whole
31+
tree at once:
32+
33+
```sh
34+
deno check src/
35+
deno check "src/**/*.ts"
36+
```
37+
38+
To skip files or directories, use the top-level `exclude` field in `deno.json`.
39+
It applies to `deno check` along with other subcommands like `deno fmt` and
40+
`deno lint`:
41+
42+
```jsonc title="deno.json"
43+
{
44+
"exclude": ["dist/", "vendor/", "**/*.generated.ts"]
45+
}
46+
```
47+
48+
See
49+
[include and exclude](/runtime/fundamentals/configuration/#include-and-exclude)
50+
in the configuration reference for the full glob syntax, including how to
51+
un-exclude a sub-path.
52+
2853
## Type-checking remote modules
2954

3055
By default, only local modules are type-checked. Use `--all` to also type-check

0 commit comments

Comments
 (0)