記錄一下怎麼檢查 git staged 的檔案是否符合 ESLint 規範,先以 vue 專案為例,因為使用 npx create-vue@latest 可以快速幫我們建好 ESLint 的檔案和環境。
順便說一下,我的 demo 專案已經有初始化 git 了,所以要跟著操作的話,記得要先將專案的 git 環境設定好。
個人網站筆記:https://wei-docusaurus-vercel.vercel....
Github:https://github.com/WeiYun0912
文章:https://wei-docusaurus-vercel.vercel....
husky:https://typicode.github.io/husky/
lint-staged:https://github.com/lint-staged/lint-s...
#eslint