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 problemCommon 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
- Read each rule and location in the output.
- Fix the code, or configure lint rules/excludes in deno.json intentionally.
- Re-run
deno lintto confirm it passes.
Terminal
deno lintKeep 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 lintlocally before pushing. - Keep lint rules and excludes in deno.json under version control.
- Address findings rather than disabling rules broadly.
Related guides
Deno "fmt --check ... Not formatted" gate failing in CIFix Deno "error: Found N not formatted files" from deno fmt --check in CI - files do not match the formatter…
Deno check TypeScript type errors (TS...) in CIFix Deno "error: TS...." type-check failures in CI - deno check reports TypeScript diagnostics that fail the…
Deno "error: No test modules found" in CIFix Deno "error: No test modules found" in CI - deno test matched no files, so the step exits nonzero without…