@darcytech/prettier-config-darcytech
简介
Prettier
推荐配置
安装
npm install --save-dev @darcytech/prettier-config-darcytech prettier
用法
// .prettierrc.js
const config = require('@darcytech/prettier-config-darcytech');
module.exports = config;
最佳实践
如果当前ES版本不支持尾逗号或babel配置不支持尾逗号,建议将trailingComma
配置为es5
// .prettierrc.js
const config = require('@darcytech/prettier-config-darcytech');
module.exports = {
...config,
trailingComma: 'es5',
};