> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# no-alias-methods

[Added in v0.8.2](https://github.com/web-infra-dev/rslint/releases/tag/v0.8.2)
## Configuration

| Preset                     | Configured Value |
| -------------------------- | ---------------- |
| ✅ rstestPlugin.configs.all | `"warn"`         |


```ts title=rslint.config.ts
import { defineConfig, rstestPlugin } from '@rslint/core';

export default defineConfig([
  rstestPlugin.configs.recommended,
  {
    rules: {
      'rstest/no-alias-methods': 'error',
    },
  },
]);
```

## Rule Details

Requires canonical matcher names so assertions use one consistent vocabulary. For example, it replaces `toBeCalled` with `toHaveBeenCalled` and `toThrowError` with `toThrow`.

The rule checks normal dot access and static bracket access. Computed matcher names are ignored because their value is only known at runtime.

## Incorrect

```ts
expect(handler).toBeCalled();
expect(handler).lastCalledWith('ready');
```

## Correct

```ts
expect(handler).toHaveBeenCalled();
expect(handler).toHaveBeenLastCalledWith('ready');
```

## Autofix

Replaces static dot and bracket matcher aliases with canonical names while preserving the original access style.
