vitest/unbound-method
March 22, 2026 ยท View on GitHub
๐ Enforce unbound methods are called with their expected scope.
โ ๏ธ This rule warns in the ๐ all config.
๐ญ This rule requires type information.
This rule extends the base [@typescript-eslint/unbound-method][original-rule]
rule, meaning you must depend on @typescript-eslint/eslint-plugin for it to
work. It adds support for understanding when it's ok to pass an unbound method
to expect calls.
How to use this rule
This rule is enabled in the all config.
{
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
ecmaVersion: 2020,
sourceType: 'module',
},
overrides: [
{
files: ['test/**'],
plugins: ['vitest'],
rules: {
'@typescript-eslint/unbound-method': 'off',
'vitest/unbound-method': 'error',
},
},
],
rules: {
'@typescript-eslint/unbound-method': 'error',
},
}
Options
Checkout @typescript-eslint/unbound-method options. including ignoreStatic