# @kapouer/eslint-plugin-no-return-in-loop

> eslint plugin to report return statements in loop

Latest version **1.0.0** (published 2021-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kapouer/eslint-plugin-no-return-in-loop
pnpm add @kapouer/eslint-plugin-no-return-in-loop
yarn add @kapouer/eslint-plugin-no-return-in-loop
bun add @kapouer/eslint-plugin-no-return-in-loop
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-09-15 |
| First published | 2021-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jérémy Lal |
| Maintainers | kapouer |
| Keywords | eslint, plugin |

## Links

- npm: https://www.npmjs.com/package/@kapouer/eslint-plugin-no-return-in-loop
- Repository: https://github.com/kapouer/eslint-plugin-no-return-in-loop
- Homepage: https://github.com/kapouer/eslint-plugin-no-return-in-loop#readme
- Issues: https://github.com/kapouer/eslint-plugin-no-return-in-loop/issues
- npm.io page: https://npm.io/package/@kapouer/eslint-plugin-no-return-in-loop

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-09-15

## README

eslint-plugin-no-return-in-loop
===============================

This plugin reports an error when there is an empty `return` in a loop:

Not okay:

```js
for (const n of [1, 2, 3]) {
 if (n === 2) return; /* this was surely meant to be `break` or `continue`
}
```

Okay:
```js
for (const n of [1, 2, 3]) {
 if (n === 2) return true;
}
```

Install:

```sh
npm install @kapouer/eslint-plugin-no-return-in-loop
```

Configure:

```json
"plugins": [
 "@babel",
 "@kapouer/no-return-in-loop"
],
"rules": {
 "@kapouer/no-return-in-loop/no-return-in-loop": "error"
}
```

---
_Source: https://npm.io/package/@kapouer/eslint-plugin-no-return-in-loop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
