> 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-dynamic-delete

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

| Preset                         | Configured Value |
| ------------------------------ | ---------------- |
| ✅ ts.configs.strict            | `"error"`        |
| ✅ ts.configs.strictTypeChecked | `"error"`        |


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

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

## Rule Details

Disallow the `delete` operator on computed property keys unless the key is a literal.

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

```typescript
const container: { [i: string]: 0 } = {};
delete container[name];
delete container['aa' + 'b'];
delete container[`name`];
```

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

```typescript
const container: { [i: string]: 0 } = {};
delete container['name'];
delete container[7];
```

## Original Documentation

- [typescript-eslint: no-dynamic-delete](https://typescript-eslint.io/rules/no-dynamic-delete)
- [Source code](https://github.com/typescript-eslint/typescript-eslint/blob/v8.67.0/packages/eslint-plugin/src/rules/no-dynamic-delete.ts)
