nuxtrdev / nuxtr-vscode

An extension offering commands and tools to make your experience with Nuxt more pleasant.
https://marketplace.visualstudio.com/items?itemName=Nuxtr.nuxtr-vscode
327 stars 13 forks source link

fix: generate template as script setup lang="ts" #147

Open RihanArfan opened 3 months ago

RihanArfan commented 3 months ago

πŸ”— Linked issue / Discussion

No open issue/discussion. Feel free to close if you're unhappy with the PR.

❓ Type of change

πŸ“š Description

Currently, Vue files generated by the default Nuxtr settings/template (with the defaults of script setup and typescript end up as <script lang="ts" setup>

For me, logically I think script setup is the name, and TypeScript is just language being used, so I've changed the template's order to:

<script setup lang="ts">

</script>

This style suggestion is backed up by Vue's documentation. See naming and code examples here. https://vuejs.org/api/sfc-script-setup

This is also how Volar IntelliSense suggests creating it image

πŸ“ Checklist