deno check does not accept noImplicitReturns
hello. i have the following config inside
deno.json
:
running deno check
still allows function signatures without the return type. how can i enforce the deno check
to fail if no return type is present?11 Replies
for example,
deno check
does not error on the following, even though the Response
return type is not provided:
please ping me if you reply to this post, thank you@subbed could you please open an issue in Deno repo about it?
It looks like a bug
GitHub
deno check does not enforce noImplicitReturns · Issue #26265 · deno...
deno 2.0.0 (stable, release, x86_64-unknown-linux-gnu) v8 12.9.202.13-rusty typescript 5.6.2 deno check seemigly does not enforce the noImplicitReturns clause. Having the following deno.json snippe...
Thank you :deno_thankyou:
as temporary workaround you can use biome.js along with deno lint
i have used biome for quite a while now. regardless, it is an additional config file on the root, so a fix would be appreciated
as i said, temporary
correct, and as i said, i have been using it thus far. thank you for your recommendation regardless
@bartlomieju ok so, considering this reply here on the issue, is there even an option to truly enforce strict checks, enforcing return types? https://github.com/denoland/deno/issues/26265#issuecomment-2413938566
GitHub
deno check does not enforce noImplicitReturns · Issue #26265 · deno...
deno 2.0.0 (stable, release, x86_64-unknown-linux-gnu) v8 12.9.202.13-rusty typescript 5.6.2 deno check seemigly does not enforce the noImplicitReturns clause. Having the following deno.json snippe...
TBH I'm not sure - we're at the mercy of TS compiler here - if it has an option for it then we support it
Responded in the issue - we have a lint for that https://lint.deno.land/rules/explicit-function-return-type
ah, awesome, thank you!