Skip to content

Deno lsp doesn't report plugin lints if they require runtime permissions #28258

Open
@sigmaSd

Description

@sigmaSd

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lintIssues related to deno lint

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions