warning
no-use-before-definePrevents use of an identifier that has not yet been declared
Examples
❌ Incorrect
alert(a);
const a = 10;
f();
function f() {};
function g() {
return b;
}
const b = 1;
✅ Correct
const a = 10;
alert(a);
function f() {};
f();
const b = 1;
function g() {
return b;
}