disallowUnusedVariables

Disallows unused variables defined with var, let or const.

Types: Boolean

Values: true

Example

"disallowUnusedVariables": true
Valid
var x=1;

function getX() {
    return x;
}
Invalid
var x=1;

function getX() {
    return true;
}
Rule source
Test source