kangax / jscritic

Quickly check how well 3rd party script behaves.
jscritic.com
118 stars 8 forks source link

Using an string parameter with `setTimeout` and `setInterval` is also a form of eval #16

Open chris-l opened 10 years ago

chris-l commented 10 years ago

Just like with new Function, this is also a form of eval.

After checking your a8288bc commit, you only need to add to that line || e.code === 'W066'.

W066 is the code for a "Implied eval" (the kind of eval done by setTimeout and setInterval).

Check the code on the jshint source here: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js#L137