menu

no-useless-rename

Disallow imports, exports, and destructuring fields renamed to the same name

Renaming an import, export, or destructured field to its existing name adds syntax without changing the introduced binding. Instead, you SHOULD use the corresponding shorthand form.

Reported

1function name(user: { name: string }): string {2    const { name: name } = user;3    return name;4}

Accepted

1function name(user: { name: string }): string {2    const { name } = user;3    return name;4}