exportUniqueNames
Reports duplicate export names in a module.
✅ This rule is included in the ts untyped presets.
Having multiple exports with the same name creates ambiguity about which value is exported. This can lead to confusion and runtime errors when consuming the module.
Examples
Section titled “Examples”export const value = 1;export { value };const a = 1;const b = 2;export { a };export { b as a };export const value = 1;const a = 1;const b = 2;export { a, b };Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”This rule catches actual errors, so you should generally keep it enabled. TypeScript itself will catch many of these cases, but this rule provides earlier feedback.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
import/exports - Oxlint:
import/exports
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.