Skip to content
Latchkey

Deno lint failures (deno lint) in CI

deno lint applies its built-in rules and exits non-zero when any file violates one. In CI this fails the job and prints the rule name, file, and line for each finding.

What this error means

The lint step fails with "error: Found N problems" and lists each finding with a rule name such as no-unused-vars or require-await.

deno
error[no-unused-vars]: `x` is never used
 --> /home/runner/work/app/app/src/main.ts:2:7
  |
2 | const x = 1;
  |       ^
Found 1 problem

Common causes

Code violates a built-in lint rule

An unused variable, missing await, or other rule violation is flagged and fails the gate.

Lint config differs from local

Rules enabled or excluded in deno.json differ from what you ran locally, so CI reports findings you did not see.

How to fix it

Fix or scope the violations

  1. Read each rule and location in the output.
  2. Fix the code, or configure lint rules/excludes in deno.json intentionally.
  3. Re-run deno lint to confirm it passes.
Terminal
deno lint

Keep lint config in deno.json

Declare enabled rules and excluded files so local and CI lint identically.

deno.json
{
  "lint": {
    "rules": { "tags": ["recommended"] },
    "exclude": ["dist/"]
  }
}

How to prevent it

  • Run deno lint locally before pushing.
  • Keep lint rules and excludes in deno.json under version control.
  • Address findings rather than disabling rules broadly.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →