An eslint plugin to prevent
for (...of) loops usage in your code base.
npm install --save-dev eslint-plugin-no-for-of-loops
Disallow use of
for (..of) loops.
for (...of) loops requires
Symbol and iterator polyfills to work on older browsers (see babel/babel#1534).
Depending on your browsers target (for example, Android 4.4 in-app Webview is capped to Chrome 33), you might not want to include those polyfills to save a few kilobytes.
Disabling the rule
Want to disable the rule anyway? Your call :
// eslint-disable-next-line no-for-of-loops/no-for-of-loopsfor let i of iterable// ...
This project was initialy forked form eslint-plugin-no-loops. Kudos!