> 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-redundant-type-constituents

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

| Preset                              | Configured Value |
| ----------------------------------- | ---------------- |
| ✅ ts.configs.recommendedTypeChecked | `"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-redundant-type-constituents': 'error',
    },
  },
]);
```

## Rule Details

Disallow members of unions and intersections that do nothing or override other members.

Some types can override other types in a union or intersection, rendering them redundant. For example, `any` in a union type overrides all other members, and `never` in an intersection type overrides all other members. These redundant constituents can be misleading and should be removed.

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

```typescript
type Union = any | string;
type Intersection = string & any;
type PrimitiveOverride = string | 'hello';
type NeverUnion = string | never;
```

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

```typescript
type Union = string | number;
type Intersection = string & { foo: string };
type ValidUnion = string | number | boolean;
type ReturnType = string | never; // allowed in return type position
```

## Original Documentation

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