在使用Vetur(用于处理Vue的扩展程序)的Visual Studio Code中,“转到定义”功能将无法在组件导入中起作用,其中结尾没有
我想知道是否有一种eslint规则可以强制用户在
例如:
.vue
扩展名(Vetur FAQ link)。我想知道是否有一种eslint规则可以强制用户在
.vue
文件中使用import
语句时始终提供扩展名?例如:
✔️ This works:
import HelloWorld from '@/components/HelloWorld.vue'
Right clicking on
HelloWorld
and pressingGo to definition
in VS Code wil take you to theHelloWorld.vue
file.❌ This doesn't:
import HelloWorld from '@/components/HelloWorld'
If you press
Go to definition
onHelloWorld
(leftmost), VS Code will just move the cursor to theHelloWorld
you just right clicked. Intended behavior is that we move to theHelloWorld.vue
file.
.vue
文件不起作用。请查看我在原始问题下的评论。我已经提交了一个问题。但是它对于.js文件按预期工作。 - user10706046^2.18.2
。 - Farnabaz