eslint-plugin-no-cstyle-for-loop

1.2.0 • Public • Published

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"
  }
}

Readme

Keywords

Package Sidebar

Install

npm i eslint-plugin-no-cstyle-for-loop

Weekly Downloads

7

Version

1.2.0

License

MIT

Unpacked Size

4.53 kB

Total Files

4

Last publish

Collaborators

  • nemurubaka