-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
globbing support when type checking #24668
Comments
@lucacasonato @FND |
@yazan-abdalrahman The deno check "**/*.ts"
error: Module not found "file:///Users/marvinh/dev/denoland/docs/**/*.ts". Instead, it should type check all files that match the glob pattern. In this case that would be all files in the current directory and below that end with |
But for "lint" I think this wrong? |
That's odd, I'm not getting the error for |
@marvinhagemeister that's correct ? |
Lgtm. The error is expected as using JSX is only valid inside |
Looking good with Deno 1.46 - thank you all! |
shell script for module discovery is no longer necessary, as Deno v1.46 now supports globbing when type checking: denoland/deno#24668
we're including reusable library functionality for client apps in this repo (limited to crypto for now), but client-side environments require slightly different settings for testing and type checking (at least if we wanna remain strict) - so unfortunately, we need non-trivial scripts to make that work in the process, simplified type checking as Deno now supports globbing throughout (see denoland/deno#24668)
we're including reusable library functionality for client apps in this repo (limited to crypto for now), but client-side environments require slightly different settings for testing and type checking (at least if we wanna remain strict) - so unfortunately, we need non-trivial scripts to make that work in the process, simplified type checking as Deno now supports globbing throughout (see denoland/deno#24668)
As far as I can tell,
deno check
expects a file as entry point; it does not support targeting directories (failing silently; i.e. this limitation isn't obvious). Globbing might be used instead, but appears to be unsupported - unlike with adjacent commands (cf. #19102), which seems like a confusing inconsistency.Thus projects without an obvious entry point covering all code (e.g. libraries with independent modules) need an out-of-band solution for module discovery, often resulting in shell scripts with limited portability.
Ideally,
check
should work just likelint
,fmt
andtest
:Perhaps it should also support targeting directories, though that might be a separate issue.
(For additional context, I've started documenting the way I've come to appreciate Deno as general-purpose tooling even beyond Deno-as-runtime projects, notably for client-side code.)
Version: Deno 1.45.2
The text was updated successfully, but these errors were encountered: