-
Notifications
You must be signed in to change notification settings - Fork 97
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
Always move component documentation comment to the top #137
Comments
I think I like this change though I've never used this component documentation, so take that with a grain of salt. We should probably update the faq question you linked to if this change is made to use the same style. |
I would support this, but only for comments that actually do contain Other top-level comments I believe should just stay where ever the author put them (i.e. in the example above the comment would be first only if it was originally put before the If we reorder all comments it wouldn't be possible to comment on the top-level HTML-tag, e.g.
|
Only the Your comment about "other comments are reorded" got me thinking though. Maybe we don't even need this kind of special behavior if we try to leave comments at its original place instead. Then everyone is free to place it whereever he wants (which I guess will be the top of the file most of the time). |
@dummdidumm I agree; that would indeed seem most transparent. Also, my memory is the size of a turtle's; since #130 the comments should already stay in place; I was testing using an old version. So maybe nothing needs to be done after all? |
Unfortunately not, only a |
Oh, right, true. We'd need to extend that to work with arbitrary comments then essentially. Looking at the code, that would also make sense code-wise. Seems like it should be a simple change. |
You can create documentation for a Svelte component like this. I think it makes sense to always have this at the top of the file.
Current result when using
scripts-markup-style
:Desired result:
This would be a breaking change.
Thoughts?
The text was updated successfully, but these errors were encountered: