npm i prettier package.json { "scripts" : { "prettier" : "prettier -w src/" } } 參考資料 prettier - npm Prettier · Opinionated Code Formatter