# unbound-method

Rule `vitest/unbound-method`. Enforce unbound methods are called with their expected scope

- Source: vitest
- Technologies: Testing
- Kind: correctness
- Needs type information: yes
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2184 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vitest/unbound-method` | no | no | package `@vitest/eslint-plugin` | [docs](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/unbound-method.md) |

## Enable it

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

```js
import vitest from "@vitest/eslint-plugin";

export default [
  {
    plugins: { vitest },
    rules: {
      "vitest/unbound-method": "error",
    },
  },
];
```

## Related rules

- [typescript/unbound-method](https://lintradar.dev/rules/typescript/unbound-method.md): Enforce unbound methods are called with their expected scope
- [jest/unbound-method](https://lintradar.dev/rules/jest/unbound-method.md): Enforce unbound methods are called with their expected scope
- [vitest/prefer-vi-mocked](https://lintradar.dev/rules/vitest/prefer-vi-mocked.md): Require `vi.mocked()` over `fn as Mock`
- [vitest/warn-todo](https://lintradar.dev/rules/vitest/warn-todo.md): Disallow `.todo` usage
- [vitest/require-to-throw-message](https://lintradar.dev/rules/vitest/require-to-throw-message.md): Require toThrow() to be called with an error message
- [vitest/require-test-timeout](https://lintradar.dev/rules/vitest/require-test-timeout.md): Require tests to declare a timeout

---

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