0
点赞
收藏
分享

微信扫一扫

云原生Kubernetes:K8S安全机制

最不爱吃鱼 2023-09-30 阅读 23

文章目录

前言

安装

我使用的vsCode插件中的Prettier - Code formatte,之后在vsCode中勾选上保持代码时格式化文件
在这里插入图片描述
在这里插入图片描述

使用

新建 .prettierrc.cjs文件放在项目的根目录中(src同级)

// prettier的默认配置文件
module.exports = {
  // 一行最多 100 字符
  printWidth: 100,
  // 使用 2 个空格缩进
  tabWidth: 2,
  // 不使用缩进符,而使用空格
  useTabs: false,
  // 不尾随分号
  semi: false,
  // 使用单引号
  singleQuote: true,
  // 多行逗号分割的语法中,最后一行不加逗号
  trailingComma: 'none',
   // 单个参数的箭头函数不加括号 x => x
  arrowParens: 'avoid',     
  // 对象大括号内两边是否加空格 { a:0 }
  bracketSpacing: true,    
}


举报

相关推荐

0 条评论