Dimples's blog Dimples's blog
首页
  • 前端随笔

    • React
  • 系列文章

    • 《ES6 教程》笔记
    • 《Vue》笔记
    • 《TypeScript》笔记
  • 后端文章

    • Java
    • Python
    • 数据库
  • 学习笔记

    • 《Rust》笔记
    • 《SpringBoot》笔记
    • 《Django》笔记
    • 《Docker》笔记
    • 《Python爬虫》笔记
技术分享
友情链接
索引
关于
GitHub (opens new window)

DimplesY

不会写代码
首页
  • 前端随笔

    • React
  • 系列文章

    • 《ES6 教程》笔记
    • 《Vue》笔记
    • 《TypeScript》笔记
  • 后端文章

    • Java
    • Python
    • 数据库
  • 学习笔记

    • 《Rust》笔记
    • 《SpringBoot》笔记
    • 《Django》笔记
    • 《Docker》笔记
    • 《Python爬虫》笔记
技术分享
友情链接
索引
关于
GitHub (opens new window)
  • PicGo+Gitee构建图床
  • 个人常用的Prettier配置
    • Prettier
  • 移动端适配viewport缩放方案
  • 移动端适配vw方案
  • 移动端适配动态rem方案
  • package.json中script的生命周期
  • 个人技术分享
DimplesY
2022-08-23

个人常用的Prettier配置

# Prettier

Prettier 是一个代码格式化工具,使用 Prettier 能够使我们团队代码的风格有效的保持一致

下面是我个人的一下常用的 Prettier 配置

{
  "arrowParens": "always",
  "bracketSameLine": true,
  "bracketSpacing": true,
  "embeddedLanguageFormatting": "auto",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxSingleQuote": false,
  "printWidth": 150,
  "proseWrap": "never",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": false,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "all",
  "useTabs": false,
  "vueIndentScriptAndStyle": false,
  "singleAttributePerLine": false
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

还有更多的配置可以参考 Prettier 官网 (opens new window)

帮助我修改此页面 (opens new window)
#前端工程化
上次更新: 2022/11/20, 18:28:09
PicGo+Gitee构建图床
移动端适配viewport缩放方案

← PicGo+Gitee构建图床 移动端适配viewport缩放方案→

最近更新
01
使用 strapi 快速构建 API 和 CMS 管理系统
03-03
02
Rust 开发环境
11-26
03
使用 paka.dev 为 npm 包生成文档
11-24
更多文章>
Theme by Vdoing | Copyright © 2020-2025 Dimples YJ | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式