This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
.vue
Imports in TSTypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
Extensions: Show Built-in Extensions
from VSCode's command paletteTypeScript and JavaScript Language Features
, right click and select Disable (Workspace)
Developer: Reload Window
from the command palette.//eslint 安装 yarn add eslint -D
//eslint vue插件安装 yarn add eslint-plugin-vue -D
//eslint 识别ts语法 yarn add @typescript-eslint/parser -D //eslint ts默认规则补充 yarn add @typescript-eslint/eslint-plugin -D //eslint prettier插件安装 yarn add eslint-plugin-prettier -D //用来解决与eslint的冲突 yarn add eslint-config-prettier -D //安装prettier yarn add prettier -D
yarn add husky -D
yarn add lint-staged -D
yarn add @commitlint/cli @commitlint/config-conventional -D
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。