> 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-test-prefixes

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

| Preset                           | Configured Value |
| -------------------------------- | ---------------- |
| ✅ jestPlugin.configs.all         | `"error"`        |
| ✅ jestPlugin.configs.recommended | `"error"`        |


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

export default defineConfig([
  jestPlugin.configs.recommended,
  {
    rules: {
      'jest/no-test-prefixes': 'error',
    },
  },
]);
```

## Rule Details

Jest lets you focus or skip tests in more than one way. You can use **`.only` and `.skip`** on the normal APIs—for example `it.only`, `test.only`, `describe.only`, `it.skip`, `test.skip`, and `describe.skip`. Alternatively, Jest supports **short `f` and `x` prefixes**: `fit`, `fdescribe`, `xit`, `xtest`, and `xdescribe`.

This rule requires the **`.only` / `.skip`** style and reports calls that use the **`f` / `x`** spellings. Replacements are suggested automatically (for example `fit` → `it.only`, `xit` → `it.skip`).

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

```typescript
fit('foo');
fdescribe('foo');
xit('foo');
xtest('foo');
xdescribe('foo');
```

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

```typescript
it.only('foo');
test.only('foo');
describe.only('foo');
it.skip('foo');
test.skip('foo');
describe.skip('foo');
```

## Original Documentation

- [eslint-plugin-jest: no-test-prefixes](https://github.com/jest-community/eslint-plugin-jest/blob/v29.16.0/docs/rules/no-test-prefixes.md)
- [Source code](https://github.com/jest-community/eslint-plugin-jest/blob/v29.16.0/src/rules/no-test-prefixes.ts)
