# @putout/plugin-remove-useless-operand

> 🐊Putout plugin adds ability to remove useless operand

Latest version **3.0.0** (published 2025-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @putout/plugin-remove-useless-operand
pnpm add @putout/plugin-remove-useless-operand
yarn add @putout/plugin-remove-useless-operand
bun add @putout/plugin-remove-useless-operand
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2025-05-11 |
| First published | 2021-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 795 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | putout, putout-plugin, plugin, operand, useless |

## Links

- npm: https://www.npmjs.com/package/@putout/plugin-remove-useless-operand
- Repository: https://github.com/coderaiser/putout
- Homepage: https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-operand#readme
- Issues: https://github.com/coderaiser/putout/issues
- npm.io page: https://npm.io/package/@putout/plugin-remove-useless-operand

## Recent versions

- 3.0.0 (latest) — 2025-05-11
- 2.1.0 — 2022-05-11
- 2.0.0 — 2022-05-01
- 1.1.0 — 2021-05-10
- 1.0.1 — 2021-05-08
- 1.0.0 — 2021-05-08

## README

# @putout/plugin-remove-useless-operand [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-operand.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-operand "npm"

> The [**increment operator**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Increment) (`++`) adds one to its operand and returns a value.
>
> The [**addition assignment operator**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Addition_assignment) (`+=`) adds the value of the right operand to a variable and assigns the result to the variable.
>
> (c) MDN

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to remove useless **operand**.

## Install

```
npm i @putout/plugin-remove-useless-operand
```

## Rule

```json
{
    "rules": {
        "remove-useless-operand": "on"
    }
}
```

## ❌ Example of incorrect code

```js
a = a + b;
a = b + a;
b += 1;
```

## ✅ Example of correct code

```js
a += b;
++b;
```

## License

MIT

---
_Source: https://npm.io/package/@putout/plugin-remove-useless-operand · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
