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
docs: standardize indentation and tag positioning #22157
Conversation
β¦And Style Bindings" section of the documentation.
Run & review this pull request in StackBlitz Codeflow. |
β Live Preview ready!
|
Awesome! Maybe we can also get rid of |
I don't know if this is Nuxt team policy or if it's just a habit for the programmer to include lang="ts" for sections that are not using TypeScript. If Nuxt team approves, I'm also willing to fix this issue. |
Cc @danielroe |
I would recommend keeping that in as a sensible default. |
Are you in favor of converting all |
Yes π In general when we do things like this it would also be nice to add some kind of test or rule to ensure the default continues to be applied, but that's not necessarily on you to do. |
<button v-if="!show" @click="show = true">Show List</button> | ||
</div> | ||
</template> | ||
|
||
<script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's convert to composition api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know this. It may be intentional to let the user know they can work with both modes. Because in the example below, the Composition API has been used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be worth ultimately supporting a toggle between modes but for now we can probably leave them as they are.
Like Vue, our default should be composition API/script setup unless we are specifically explaining the options API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! β€οΈ
π Linked issue
β Type of change
π Description
I believe that newcomers tend to internalize the code patterns present in the documentation as they read it. This will indeed help them write clean code by following established patterns.
π Checklist