ESLint

VSCode Fix ESLint Issue on Save

在日常開發中,我們經常需要使用 ESLint 來保持代碼質量和一致性。每次手動修復 ESLint 問題會很麻煩,但我們可以配置 VSCode 在保存文件時自動修復 ESLint 問題。 配置 VSCode 自動修復 ESLint 問題 1. 安裝 ESLint 擴展 首先,確保你已經安裝了 ESLint 擴展。 2. 配置 settings.json 打開 …

ESLint couldnt find the plugin (when install dependencies using yarn)

今日嘗試用 command line (CLI) 執行 ESLint 時出現了以下的錯誤信息 # eslint command eslint ./src Error: Cannot find module 'eslint-config-airbnb'