virtual-labs-archive / vlsi-iiith

Other
3 stars 271 forks source link

Avoid arguments.callee. (no-caller) #193

Open BSravanthi opened 5 years ago

BSravanthi commented 5 years ago

The use of arguments.caller and arguments.callee make several code optimizations impossible. They have been deprecated in future versions of JavaScript and their use is forbidden in ECMAScript 5 while in strict mode. This rule is aimed at discouraging the use of deprecated and sub-optimal code, but disallowing the use of arguments.caller and arguments.callee. As such, it will warn when arguments.caller and arguments.callee are used. The following patterns are considered problems:

//Bad:
function foo(n) {
    if (n <= 0) {
        return;
    }
    arguments.callee(n - 1); 
}

//Good:
function foo(n) {
    if (n <= 0) {
        return;
    }

    foo(n - 1);
}
yuvrajmakkena commented 5 years ago

https://github.com/yuvrajchowdary/vlsi-iiith/commit/d37b5dfd5f2e4cc5b63319a8a2f4a2fb0e71dc93

https://github.com/yuvrajchowdary/vlsi-iiith/commit/6bf6cbde85c60f293dcfaaf929f6700c6d08242b

https://github.com/yuvrajchowdary/vlsi-iiith/commit/91c08f097e815eb0c626efad5af8446a561dcf58

https://github.com/yuvrajchowdary/vlsi-iiith/commit/f35ba7d9ac016eda63df524815e001204214fc11

https://github.com/yuvrajchowdary/vlsi-iiith/commit/6266e1df3dacd577d8f075d10e7ba98d77c912f0

https://github.com/yuvrajchowdary/vlsi-iiith/commit/f18d0757c7305ffc0e0b9ad95408890486c00725

https://github.com/yuvrajchowdary/vlsi-iiith/commit/089100d49be64962e3f922e3ed1a5eb1c9676a0f

https://github.com/yuvrajchowdary/vlsi-iiith/commit/213d5af00124e3c8131cc32daaf68c4a779d610d

https://github.com/yuvrajchowdary/vlsi-iiith/commit/9d3810d2b9657c10ae0116055b530b8ebf03fb5a

https://github.com/yuvrajchowdary/vlsi-iiith/commit/e2de45490f8644593262c6e6dfef9f4798fb4c12

https://github.com/yuvrajchowdary/vlsi-iiith/commit/bdeb6c0329452a96aad469dea8aff9403d203b50

https://github.com/yuvrajchowdary/vlsi-iiith/commit/dc1730ca25648e68ad64ac78272f5e1efefae128

https://github.com/yuvrajchowdary/vlsi-iiith/commit/5cfc3584f4685bea7ebcd7cca3f336b3fd4ef59b

I'm not sure about this amo2009.js

https://github.com/yuvrajchowdary/vlsi-iiith/commit/05827d6c432ff068c39b6eea6bbf2e8b6d25c4ef

https://github.com/yuvrajchowdary/vlsi-iiith/commit/05827d6c432ff068c39b6eea6bbf2e8b6d25c4ef

https://github.com/yuvrajchowdary/vlsi-iiith/commit/2c883114dc668b75330bd2a455b31476b4265b65

https://github.com/yuvrajchowdary/vlsi-iiith/commit/8a3b4f4d98309cf48a81f6561c3180b8b27b7eae

ShivaniKomandury commented 5 years ago

valid fix @yuvrajchowdary I checked all.