Vue 3 教學 - 使用 ESLint 提高 Debug 效率 (Vue3, ESLint)

Опубликовано: 17 Февраль 2026
на канале: Wei Wei 前端教學
497
20

分享一些最近常用的 ESLint Rules

個人網站筆記:https://wei-docusaurus-vercel.vercel....

Github:https://github.com/WeiYun0912

影片中的設定檔:https://gist.github.com/WeiYun0912/be...

eslint-vue:https://eslint.vuejs.org/

0:00 說明
0:13 問題點
1:45 查看所有 rule
2:35 檢查有沒有在 template 使用了 但卻尚未 import 的 component
3:39 檢查有沒有在 template 使用了 但卻尚未定義的變數
4:50 強制使用 === 與 !==
7:21 檢查 emit 裡面的 custom event 有沒有被使用
9:53 檢查 array 方法有沒有 return。

---------------------------------------
#vue3 #vue #eslint