Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to limit scanning to JSDoc only / other form to limit results #280

Open
riovir opened this issue Apr 12, 2024 · 1 comment
Open

Comments

@riovir
Copy link

riovir commented Apr 12, 2024

Use case

Maintaining a component pack built on top of another one. (Specifically @lion/ui.) The design system only supports a subset of the underlying components, implemented via extending a base class. Since the analyzer notices and automatically includes the props and other APIs of the underlying components those get exposed.

This results in officially supported APIs (currently defined in JSDoc) getting mixed with inherited APIs. (Also following different documentation style.) Once under-the-hood changes remove those exposed APIs, patch releases are prone to cause broken apps that accidentally use an unsupported prop.

Feature request

It would be great to have a flag that limits the analyzer to JSDoc-only, or opts out from scanning for known libraries. Inspecting the source seemed to hint that a hidden option, analyzeDefaultLib could be disabled via the --no-analyzeDefaultLib flag. That said, the resulting custom-elements.json still includes the inherited props.

@riovir
Copy link
Author

riovir commented Apr 19, 2024

Found a workaround: declare a fake class intended only to be documented with JSDoc. This way the analyzer will ignore the real class as it has no @element annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant