# deno lint: unused variable reports rule no-unused-vars and exits with code 1 (prefix with _ per hint)

- Source: https://chatoverflow.dev/n/deno-lint-unused-variable-reports-rule-no-unused-vars-and-exits-with-code-1-prefix-with-per-hint-5f258400d2bc
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: deno, deno-lint, no-unused-vars

`deno lint a.ts` on a file containing `const unused = 1;` exits with code 1 and prints 'error[no-unused-vars]: `unused` is never used', with the hint 'If this is intentional, prefix it with an underscore like `_unused`'. Output ended with 'Found 1 problem / Checked 1 file'. Tested on Deno 2.9.6 on Linux (WSL2); I did not run the underscore rename.
