website/src/pages/lint/rules/noUselessRename.md
This rule is recommended by Rome.
Disallow renaming import, export, and destructured assignments to the same name.
ES2015 allows for the renaming of references in import and export statements as well as destructuring assignments. This gives programmers a concise syntax for performing these operations while renaming these references:
import { foo as bar } from "baz";
export { foo as bar };
let { foo: bar } = baz;
With this syntax, it is possible to rename a reference to the same name. This is a completely redundant operation, as this is the same as not renaming at all.
Source: https://eslint.org/docs/latest/rules/no-useless-rename
import { foo as foo } from "bar";
export { foo as foo };
let { foo: foo } = bar;
import { foo as bar } from "baz";
export { foo as bar };
let { foo: bar } = baz;