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.
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.
deno lintKeep lint config in deno.json
Declare enabled rules and excluded files so local and CI lint identically.
{
"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.