Skip to content

exportUniqueNames

Reports duplicate export names in a module.

✅ This rule is included in the ts javascript 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.

export const
import value
const value: 1
value
= 1;
export {
import value
const value: 1
value
};
const
const a: 1
a
= 1;
const
const b: 2
b
= 2;
export {
const a: 1
export a
a
};
export {
const b: 2
b
as
const a: 2
export a
a
};

This rule is not configurable.

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.

Made with ❤️‍🔥 around the world by the Flint team and contributors.