We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D is defined but never used here https://github.com/philipjonsen/tenderly-fork/blob/master/create.js#L70-L70
Having unused variables are dangerous to injections and such.
Unused variables are most often the result of incomplete refactoring. They can lead to confusing code and minor performance hitches.
Easy Fix:
Bad Practice
// Write-only variables are not considered as used. let y = 10; y = 5;
// A variable that modifies only itself isn't considered used. let z = 0; z = z + 1;
// Unused argument (function(x) { return 5; })();
// Unused recursive functions also raise this issue. function fact(n) { if (n < 2) return 1; return n * fact(n - 1); }
// When a function definition destructures an array, // unused entries from the array also cause warnings. function getY([x, y]) { return y; }
Recommended
let x = 10; alert(x);
((arg1) => { return arg1; })();
let myFunc; myFunc = (n) => { // this is legal if (n < 0) myFunc(); };
// this is also considered legal console.log(declaredLater); var declaredLater;
// Only the second argument from the descructured array is used. function getY([, y]) { return y; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
D is defined but never used here https://github.com/philipjonsen/tenderly-fork/blob/master/create.js#L70-L70
Having unused variables are dangerous to injections and such.
Unused variables are most often the result of incomplete refactoring. They can lead to confusing code and minor performance hitches.
Easy Fix:
Bad Practice
// Write-only variables are not considered as used.
let y = 10;
y = 5;
// A variable that modifies only itself isn't considered used.
let z = 0;
z = z + 1;
// Unused argument
(function(x) {
return 5;
})();
// Unused recursive functions also raise this issue.
function fact(n) {
if (n < 2) return 1;
return n * fact(n - 1);
}
// When a function definition destructures an array,
// unused entries from the array also cause warnings.
function getY([x, y]) {
return y;
}
Recommended
let x = 10;
alert(x);
((arg1) => {
return arg1;
})();
let myFunc;
myFunc = (n) => {
// this is legal
if (n < 0) myFunc();
};
// this is also considered legal
console.log(declaredLater);
var declaredLater;
// Only the second argument from the descructured array is used.
function getY([, y]) {
return y;
}
The text was updated successfully, but these errors were encountered: