📝 Enforce unbound methods are called with their expected scope.
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.
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',
},
}Checkout @typescript-eslint/unbound-method options. including ignoreStatic