Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cijiugechu/eslint-plugin-no-cstyle-for-loop
An eslint plugin that does not allow c-style for loops.
https://github.com/cijiugechu/eslint-plugin-no-cstyle-for-loop
eslint eslint-plugin
Last synced: 8 days ago
JSON representation
An eslint plugin that does not allow c-style for loops.
- Host: GitHub
- URL: https://github.com/cijiugechu/eslint-plugin-no-cstyle-for-loop
- Owner: cijiugechu
- License: mit
- Created: 2022-06-18T16:33:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-19T05:41:50.000Z (over 2 years ago)
- Last Synced: 2024-04-25T05:02:42.039Z (7 months ago)
- Topics: eslint, eslint-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-plugin-no-cstyle-for-loop
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-no-cstyle-for-loop
An eslint plugin that does not allow c-style for loops.
## ❌ Incorrect
```javascript
for(let i = 0; i < 10; i++) {
console.log(i);
}
```## ✅ Correct
```javascript
for(let i of [1, 2, 3]) {
console.log(i);
}
```## Installation
```shell
npm install --save-dev eslint-plugin-no-cstyle-for-loop
```## Usage
```javascript
// .eslintrc.js
{
"plugins": ["no-cstyle-for-loop"],
"rules": {
"no-cstyle-for-loop/noForLoop": "error"
}
}
```