> 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.

# prefer-ts-expect-error

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


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

export default defineConfig([
  ts.configs.recommended,
  {
    rules: {
      '@typescript-eslint/prefer-ts-expect-error': 'error',
    },
  },
]);
```

## Rule Details

Prefer `@ts-expect-error` over `@ts-ignore` in TypeScript directive comments.

Examples of **incorrect** code for this rule:

```typescript
// @ts-ignore
```

Examples of **correct** code for this rule:

```typescript
// @ts-expect-error
```

## Original Documentation

- [typescript-eslint: prefer-ts-expect-error](https://typescript-eslint.io/rules/prefer-ts-expect-error)
- [Source code](https://github.com/typescript-eslint/typescript-eslint/blob/v8.57.0/packages/eslint-plugin/src/rules/prefer-ts-expect-error.ts)
