Skip to content
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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RihanArfan
Copy link

@RihanArfan RihanArfan commented Jun 8, 2024

πŸ”— Linked issue / Discussion

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

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to 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

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant