feature-sliced / steiger

Universal file structure and project architecture linter
https://www.npmjs.com/package/steiger
MIT License
57 stars 4 forks source link

Public API for shared/lib #76

Open illright opened 1 month ago

illright commented 1 month ago

The no-public-api-sidestep rule should consider the specifics of shared/lib — its public API should be one layer deeper, in shared/lib/*/index

conarti commented 1 month ago

Is this also correct for shared/ui?

Also I think this rule doesn't need to check shared/assets as it can contain images, fonts, styles with direct import to app's main.ts. Also in my projects it has svg icons folder that automatically compiles into framework components by vite/webpack

illright commented 1 month ago

Is this also correct for shared/ui?

I think we should allow both shared/ui/index and shared/*/index, but it has to be one or the other.

Also I think this rule doesn't need to check shared/assets

I don't think this should be part of the rule, I'd rather let users exclude that folder entirely