# no-repeated-call-wrappers

Rule `unicorn/no-repeated-call-wrappers`. Disallow repeating the same wrapper at every call to a function.

- Source: unicorn
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2020 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `unicorn/no-repeated-call-wrappers` | no | no | package `eslint-plugin-unicorn` | [docs](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v80.0.0/docs/rules/no-repeated-call-wrappers.md) |

## Code examples

### Incorrect: the rule reports this

```js
const getWords = text => text.toLowerCase().split(' ');
const firstWords = new Set(getWords(first));
const secondWords = new Set(getWords(second));
```

```js
const getEntries = object => Object.entries(object);
const firstMap = new Map(getEntries(first));
const secondMap = new Map(getEntries(second));
```

```js
const readCount = object => object.count;
const firstCount = Number(readCount(first));
const secondCount = Number(readCount(second));
```

### Correct: the rule accepts this

```js
const getUniqueWords = text => new Set(text.toLowerCase().split(' '));
const firstWords = getUniqueWords(first);
const secondWords = getUniqueWords(second);
```

```js
const getMap = object => new Map(Object.entries(object));
const firstMap = getMap(first);
const secondMap = getMap(second);
```

```js
const getCount = object => Number(object.count);
const firstCount = getCount(first);
const secondCount = getCount(second);
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import unicorn from "eslint-plugin-unicorn";

export default [
  {
    plugins: { unicorn },
    rules: {
      "unicorn/no-repeated-call-wrappers": "error",
    },
  },
];
```

## Related rules

- [unicorn/no-missing-local-resource](https://lintradar.dev/rules/unicorn/no-missing-local-resource.md): Disallow references to missing local resources.
- [unicorn/no-unnecessary-default-arguments](https://lintradar.dev/rules/unicorn/no-unnecessary-default-arguments.md): Disallow arguments that match their parameter defaults.
- [unicorn/no-manually-wrapped-comments](https://lintradar.dev/rules/unicorn/no-manually-wrapped-comments.md): Disallow manually wrapped comments.
- [unicorn/no-unreadable-new-expression](https://lintradar.dev/rules/unicorn/no-unreadable-new-expression.md): Disallow unreadable `new` expressions.
- [unicorn/no-keyword-prefix](https://lintradar.dev/rules/unicorn/no-keyword-prefix.md): Disallow identifiers starting with `new` or `class`.
- [unicorn/no-unsafe-dom-html](https://lintradar.dev/rules/unicorn/no-unsafe-dom-html.md): Disallow unsafe DOM HTML APIs.

---

Web page: https://lintradar.dev/rules/unicorn/no-repeated-call-wrappers. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
