What lint error will deno lint report for the following code?
const unusedVar = 42; console.log("Hello Deno!");
Think about variables declared but never used in the code.
Deno lint checks for unused variables and will report 'unusedVar' as unused because it is declared but never used.
After running deno lint on a project, what is the expected behavior?
Consider if deno lint modifies your source files or just reports issues.
deno lint only reports lint errors and warnings. It does not modify or fix files automatically.
What specific lint error will deno lint report for this code?
function greet(name: string) {
if(name) {
console.log("Hello, " + name);
}
}
greet();Check the function parameter usage and how it is called.
The function expects a string argument, but it is called without one. Deno lint reports an error for the missing argument in the function call.
What output will deno lint produce for this code snippet?
const message = "Hello Deno"
console.log(message)Think about style rules like semicolons and how Deno lint reports them.
Deno lint includes the 'semi' rule (tagged 'recommended'), which requires semicolons and reports missing semicolons as errors.
Given a deno.json configuration with "lint": { "rules": { "tags": ["recommended"] } }, what effect does this have on deno lint?
Consider how specifying tags in lint rules filters which rules run.
Specifying tags: ["recommended"] means only lint rules with the 'recommended' tag are applied during linting.
