Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a PR for documentation purposes of a try
It was a try to add a prettier plugin for JSDoc parser, using this recommended plugin. In the middle of the changes, I gave up because we were having many issues and I think the cost-benefit doesn't worth it.
In summary, some of the errors were:
1) It throws some unhandled errors in some situations, like:
The main problem with these unhandled errors is that if there is any error in a file, it skips the whole file and we can miss files without formatting.
2) It conflicts with a Gutenberg setting.
It prefers
@returns
and@yields
instead of@return
and@yield
, and there is no option to change that.3) It forces a misalignment in the descriptions with multiline.
I believe it's a standard that we don't want. It's not explicit in the WP standard documentation, but checking Gutenberg code, it uses the description aligned.
4) It removes
@since
tags when it doesn't have a description.Future plans for JSDoc lint / prettier in Sensei:
eslint-plugin-jsdoc
.@wordpress/scripts
dependency on Sensei and enjoy.It can take a while, but I believe it'll worth it.