I just came across this issue after two years, but I’ll give it a shot anyway!
I created an ESLint plugin that enforces the Barrel pattern.
Hope it helps!
Link: https://github.com/racgoo/eslint-plugin-barrel-rules