Related to [Misc] Use re-export statements instead of import -> export by ClementEXWiki · Pull Request #683 · xwiki-contrib/cristal · GitHub
Currently in Cristal, re-exports in TypeScript are done this way:
import { obj } from 'module';
export { obj };
I think it would be better to use the following syntax, which is built into TypeScript:
export { obj } from 'module';
It makes the code both more readable and more maintainable, avoiding duplicates.
What do you think?
mleduc
2
Thanks for your proposal.
I’m +1 as long as we have a way to enforce the rule in eslint.
Otherwise, we’ll quickly have inconsistencies.
1 Like
There doesn’t seem to be a rule to enforce that writing style, so I created an issue in the eslint-plugin-import
repository: