Closed
Description
The import/first
rule causes Vue components that have both <script>
and <script setup>
tags to break because of the auto fix.
With the rule this code
<script lang="ts">
export const myVar = {};
</script>
<script lang="ts" setup>
import foo from './foo.vue'
</script>
would be "fixed" into this
<script lang="ts">
</script>
<script lang="ts" setup>
import foo from './foo.vue'
export const myVar = {};
</script>
which breaks the export, since Vue SFC components can't export anything other than types from the script setup
block.
See vuejs/eslint-plugin-vue#1577 and unovue/reka-ui#313 for references.
I suggest disabling this rule for **/*.vue
files.
Metadata
Metadata
Assignees
Labels
No labels