bluwy / publint

Lint packaging errors
https://publint.dev
MIT License
932 stars 19 forks source link

Check if root is exported through mainFields but not exports #88

Closed bluwy closed 7 months ago

bluwy commented 7 months ago

https://github.com/vitejs/vite/issues/15405

Packages could export through "main", "module", etc fields, but forgot to export them through "exports" if it's specified (specifically from the "." export key). Library authors may incorrectly assume "exports" as an extension of the library exports and not specify the root in it.