-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
effort: easyProbably a quick fix. Want to contribute? :-)Probably a quick fix. Want to contribute? :-)enhancementThe issue is asking for a new feature or design changeThe issue is asking for a new feature or design changehelp wantedIf you're looking to contribute, this issue is a good place to start!If you're looking to contribute, this issue is a good place to start!octogonz-parser-backlogItems for @octogonz to consider during the next iteration on the parserItems for @octogonz to consider during the next iteration on the parser
Description
@pgonzal and I were talking in an email thread about parsing params in api-extractor/tsdoc, and suggested I log an issue here to track the param parsing concerns.
Goals for param parsing should be;
- Public exported classes/functions have correct jsdoc comments describing the thing.
- If param comments are missing, api-extractor catches them and throws an error.
- If params are out of order, also worthy of throwing an error.
- If the params have types in them, api-extractor ignores them and parses the types from typescript typings if available.
- If the params have dashes in them, api-extractor ignores the dashes. If they are missing dashes, api-extractor ignores that. (The purpose is to extract the docs and api surface, not be nit picky about unimportant things, especially when VSCode jsdoc formatting defaults to having types AND no dashes.)
Examples that should work:
/**
* @param foo This is fine.
* @param foo {boolean} This is fine.
* @param foo - This is fine.
* @param foo {boolean} - This is fine.
* @param foo - {boolean} This is fine.
*/It is nice to stay consistent with param documentation, but the tools should also be resilient in the parsing and let formatting cleanup be the duty of tools like Prettier.
There might be a strict mode which enforces the VSCode default jsdoc comments. but please do not deviate from what most other open source projects snap to (the second example above.)
See Airbnb specs for their guidance as an example. Look at React jsdoc comments. etc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
effort: easyProbably a quick fix. Want to contribute? :-)Probably a quick fix. Want to contribute? :-)enhancementThe issue is asking for a new feature or design changeThe issue is asking for a new feature or design changehelp wantedIf you're looking to contribute, this issue is a good place to start!If you're looking to contribute, this issue is a good place to start!octogonz-parser-backlogItems for @octogonz to consider during the next iteration on the parserItems for @octogonz to consider during the next iteration on the parser