Rules

no-redundant-alias

Avoid aliases that only rename an existing value or type.

Purpose and behavior

Avoid aliases that only rename an existing value or type.

Reports non-generic plain type-reference aliases and exported identifier-only variable rebindings. Local value bindings, meaningful type transformations and parameterized aliases are outside this pattern. Re-export directly; document any anti-corruption-layer exception with a suppression reason.

Options

No configurable options. Enable with "rules/no-redundant-alias": "error".

Invalid example

type SentEmail = SendParams
export const sentEmail = sendParams

Valid example

export { sendParams }
type SentEmail = { id: string }

Fixes and exceptions

This rule reports diagnostics without an automatic fix. Rewrite the code deliberately rather than guessing its intended semantics.

For a genuine boundary exception, use an oxlint-disable-next-line rules/no-redundant-alias -- reason comment. Examples illustrate this rule alone and may omit imports and declarations.

Source and tests

Enabled by the TypeScript preset.

no-redundant-alias.ts · Tests