Closed rowellx68 closed 7 months ago
Not sure I understand, if you set amountOfExportsToConsiderModuleAsBarrel
to 0
, that means it'll pretty much consider everything to be a barrel file, because youve set the barrier to 0. Is there a reason you're setting it to 0?
Our intention is to completely get rid of/lint for barrel files so we set amountOfExportsToConsiderModuleAsBarrel
to 0
. If we were to set it to 1
we would still be able to create them like so:
// LazyLoadThisPage/index.ts
export { LazyLoadThisPage } from './LazyLoadThisPage';
More than happy to do the changes and PR if you think this is a valid use case.
sure, happy to take a PR
Plugin version:
1.0.3
System:macOS
Setting the
barrel-files/avoid-barrel-files
rule with the following options seems to be treating files with default exported functions as barrel files. We've got a workaround without disabling the rule for the file or increasing theamountOfExportsToConsiderModuleAsBarrel
.Config:
Examples:
Workaround: