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.
The rule reports plain type-reference aliases without type parameters or arguments. It also reports exported variables whose identifier initializer only renames a value. Local variables and type transformations are outside its scope. Re-export values directly. Give a suppression reason for aliases at an application boundary.
Options
No configurable options. Enable with "rules/no-redundant-alias": "error".
Invalid example
type SentEmail = SendParams
export const sentEmail = sendParamsValid example
export { sendParams }
type SentEmail = { id: string }Fixes and exceptions
This rule provides no automatic fix. Rewrite the code to preserve its intended behavior.
For a boundary exception, use oxlint-disable-next-line rules/no-redundant-alias -- reason. Examples cover this rule only and may omit imports or declarations.
Source and tests
Enabled by the TypeScript preset.