Skip to content

docs: document how to exclude files from deno check#3125

Merged
bartlomieju merged 2 commits into
mainfrom
orch/issue-67
May 14, 2026
Merged

docs: document how to exclude files from deno check#3125
bartlomieju merged 2 commits into
mainfrom
orch/issue-67

Conversation

@lunadogbot
Copy link
Copy Markdown
Contributor

Summary

The deno check reference page didn't mention how to scope or exclude paths from type-checking — a reader asked in #2915 "How do I ignore checking files under a directory?" and the page only showed checking single files or lists of files.

Adds a short Scoping and excluding files section to runtime/reference/cli/check.md covering:

  • Passing directories/globs as positional args (e.g. deno check src/, deno check "src/**/*.ts")
  • Using the top-level exclude field in deno.json, which applies to deno check along with deno fmt/deno lint
  • A link to the include and exclude section of the configuration reference for full glob syntax

Kept the addition focused per the issue's guidance — one section, one code block, link out to the configuration reference for the deeper details.

Test plan

  • deno fmt --check runtime/reference/cli/check.md clean
  • Verified the documented exclude behavior locally:
    $ echo '{"exclude":["skip/"]}' > deno.json
    $ mkdir -p skip && echo 'const x: number = "s";' > skip/bad.ts
    $ echo 'const y: number = 1;' > good.ts
    $ deno check .
    Check good.ts          # skip/bad.ts correctly excluded
  • Anchor #include-and-exclude matches Lume's slug for ## include and exclude in runtime/fundamentals/configuration.md (same pattern as other in-repo links like #linting, #formatting)

cc @bartlomieju

Closes #2915
Closes bartlomieju/orchid-inbox#67

Adds a "Scoping and excluding files" section to the `deno check`
reference, covering directory/glob positional args and the top-level
`exclude` field in `deno.json`. Links to the configuration reference
for full syntax.

Closes #2915
@lunadogbot
Copy link
Copy Markdown
Contributor Author

Heads-up on the failing lint and link check run: the failure is in the "Build: main site" step with TypeError: Cannot resolve module "lume/jsx-runtime" on /styleguide/typography.mdx, which is unrelated to this PR (a markdown-only change in runtime/reference/cli/check.md). The same failure appears on every recent PR run today across many branches, including unrelated ones — looks like a pre-existing environment/build issue on main.

Verified locally on this branch:

  • deno fmt --check — clean (698 files)
  • deno task test — 4 passed (386 steps), 0 failed

@bartlomieju bartlomieju merged commit 2d7974f into main May 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback: /runtime/reference/cli/check/ - Needs Improvement

2 participants