

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Linting
incomplete
2: CI Linting
incomplete
3: Linting Review
incomplete
This lesson's interactive features are locked, please to keep using them
"Linting" can be such a vague and confusing term. I want to go over a few of the most common and useful checks that ESLint warns about, just so you can see a few more examples.
This is one of the most common checks. It warns you about variables, functions, or parameters that are declared but never used.
let unusedVariable; // Warning: 'unusedVariable' is defined but never used
This rule enforces using === and !== instead of == and != to avoid type coercion issues.
// Warning: Expected '===' and instead saw '=='
if (value == "10") {
// ...
}
This rule disallows the use of the console object.
console.log("Something went terribly wrong! Contact Boots immediately."); // Warning: Unexpected console statement.
Before:
const message = "Hello, " + name + "!"; // Warning: Use template literals instead of string concatenation
After:
const message = `Hello, ${name}!`;