prettier
这是本文档旧的修订版!
Prettier
安装
npm install --save-dev --save-exact prettier
配置
echo {} > .prettierrc.yml
- .prettier.yml
# 单行代码的最大宽度 printWidth: 100 # 使用单引号而不是双引号 singleQuote: false overrides: - files: - "*.html" - "*.vue" - "*.tsx" options: printWidth: 120
Ignoring Code
- .prettierignore
# Ignore artifacts: build coverage
使用
npx prettier --write .
Pre-commit Hook
prettier.1634808757.txt.gz · 最后更改: 2021/10/21 17:32 由 admin