eslint-plugin-ie11
Version:
ESLint plugin for detecting unsupported ES6 features in IE11
33 lines (20 loc) • 589 B
Markdown
Avoid using `const` in for-in loops.
This rule aims to avoid IE11 error.
Examples of **incorrect** code for this rule:
```js
for( const key in { a: 1, b: 2 } ) {
// ...code here
}
```
Examples of **correct** code for this rule:
```js
for( let key in { a: 1, b: 2 } ) {
// ...code here
}
```
IE11 raise an error if cont is used in a for-in so there is no good use case.
http://kangax.github.io/compat-table/es6/#test-const_for-in_loop_iteration_scope