# noMisrefactoredShorthandAssign

Rule `biome/noMisrefactoredShorthandAssign`. Disallow shorthand assign when variable appears on both sides.

- Source: biome
- Technologies: JavaScript
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #529 by reach, #164 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `suspicious/noMisrefactoredShorthandAssign` | yes | unsafe | group suspicious, since 1.3.0 | [docs](https://biomejs.dev/linter/rules/no-misrefactored-shorthand-assign/) |

## Code examples

### Incorrect: the rule reports this

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

```js
a -= a - b
```

```js
a *= a * b
```

### Correct: the rule accepts this

```js
a += b
```

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

```js
a = a - b
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noMisrefactoredShorthandAssign": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noMisplacedListElements](https://lintradar.dev/rules/biome/noMisplacedListElements.md): Require `<li>` elements with an HTML element parent to be children of `<ul>`, `<ol>`, or `<menu>`.
- [biome/noMissingVarFunction](https://lintradar.dev/rules/biome/noMissingVarFunction.md): Require `var()` when using a declared CSS custom property.
- [biome/noJsxNamespace](https://lintradar.dev/rules/biome/noJsxNamespace.md): Disallow JSX namespace syntax.
- [biome/noObsoleteAttributes](https://lintradar.dev/rules/biome/noObsoleteAttributes.md): Disallow obsolete attributes on HTML elements.
- [biome/noJsonUnsafeValues](https://lintradar.dev/rules/biome/noJsonUnsafeValues.md): Disallow unsafe JSON values that may cause interoperability issues.
- [biome/noPlaywrightMissingAwait](https://lintradar.dev/rules/biome/noPlaywrightMissingAwait.md): Enforce Playwright async APIs to be awaited or returned.

---

Web page: https://lintradar.dev/rules/biome/noMisrefactoredShorthandAssign. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
