eslint-plugin-no-cstyle-for-loop
v1.2.0
Published
An eslint plugin that does not allow c-style for loops
Downloads
128
Readme
eslint-plugin-no-cstyle-for-loop
An eslint plugin that does not allow c-style for loops.
❌ Incorrect
for(let i = 0; i < 10; i++) {
console.log(i);
}
✅ Correct
for(let i of [1, 2, 3]) {
console.log(i);
}
Installation
npm install --save-dev eslint-plugin-no-cstyle-for-loop
Usage
// .eslintrc.js
{
"plugins": ["no-cstyle-for-loop"],
"rules": {
"no-cstyle-for-loop/noForLoop": "error"
}
}