Open
Description
deno.json
{
"lint": {
"plugins": [
"jsr:@sigmasd/deno-no-sync-in-async-lint@0.6.0"
]
}
}
a.ts
function b() {
Deno.readDirSync("");
}
export async function a() {
b();
await Promise.resolve();
}
deno lint a.ts
┏ ⚠️ Deno requests read access to "/HOME/MRCOOL/.CACHE/DENO/NPM/REGISTRY.NPMJS.ORG/TYPESCRIPT/5.7.2/LIB/TYPESCRIPT.JS".
┠─ Requested by `Deno.statSync()` API.
✅ Granted all read access.
┏ ⚠️ Deno requests env access to "TSC_WATCHFILE".
┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS env✅ Granted all env access.
error[sync-checker/no-sync-in-async]: Blocking operation found in async function 'a'
--> /home/mrcool/dev/deno/lab/pp/a.ts:6:3
|
6 | b();
| ^^^
Found 1 problem
Checked 1 file
deno lint a.ts works, but the deno lsp doesn't report the lint, presumably because it needs runtime permission (it uses typescript to analyze cross imports functions which require at-least read and env permission)
Activity