跳至主要內容

@hz-9/prettier-config

小于 1 分钟

@hz-9/prettier-config

一个适用于 'hz-9' 的 prettieropen in new window 配置。

NPM 版本 NPM 许可证 NPM 下载量
Node 版本 最后提交

Documentopen in new window | 文档open in new window

安装

要安装 @hz-9/prettier-config 包,请运行以下命令:

npm install @hz-9/prettier-config --save-dev

使用

要使用此配置,请将以下代码添加到您的 .prettierrc.js 文件中:

const prettierConfig = require('@hz-9/prettier-config')

module.exports = prettierConfig

之后,你可以运行格式化命令,调整文件格式:

prettier --write .

所有规则

名称说明
index默认配置
service-common服务端默认规则
service-sort-imports服务端默认规则 + sort-imports 的规则