Rule Definition
Because the semantics of the delete operator are a bit tricky, and it can only be reliably used to remove properties from objects. Pass anything else to it, and you may or may not get the desired result.
Violation Code Sample
var x = 1;
delete x; // Noncompliant
function foo(){
..
}
delete foo; // Noncompliant
Fixed Code Sample
var obj = {
x:1,
foo: function(){
...
}
};
delete obj.x;
delete obj.foo;
Reference
http://eslint.org/docs/rules/no-delete-var
Related Technologies
Technical Criterion
Programming Practices - Unexpected Behavior
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.