Anolilab 的可共享配置 .
Daniel Bannert的开源工作得到了社区的支持 GitHub 赞助商
安装
npm install @anolilab/prettier-config
yarn add @anolilab/prettier-config
pnpm add @anolilab/prettier-config
使用量
如果你没有 .prettierrc.js 或支持的其他文件名和 .prettierignore,我们可以在安装后为您创建文件 @anolilab/prettier-config电话 pnpm prettier-config:install。 。 。 .
注意: 如果脚本检测到已有的
.prettierrc.js文件,它不会覆盖它.
`.prettierrc.js'的文件内容
module.exports = {
// brackets are required for arrow function parameter, even when there is only one parameter
arrowParens: "always",
// spaces are required at the beginning and end of the braces
bracketSpacing: true,
// formats quoted code embedded
embeddedLanguageFormatting: "auto",
// lf for newline
endOfLine: "lf",
// decide whether to break the html according to the display style
htmlWhitespaceSensitivity: "css",
// No need to automatically insert @prettier at the beginning of the file
insertPragma: false,
// use double quotes instead of single quotes in jsx
jsxSingleQuote: false,
// max 160 characters per line
printWidth: 160,
// use default break criteria
proseWrap: "preserve",
// object's key is quoted only when necessary
quoteProps: "as-needed",
rangeEnd: Number.POSITIVE_INFINITY,
// format the entire contents of the file
rangeStart: 0,
// no need to write the beginning @prettier of the file
requirePragma: false,
// semicolon at the end of the line
semi: true,
// use single quotes
singleQuote: false,
// use 4 spaces for indentation
tabWidth: 4,
// all comma at the end
trailingComma: "all",
// use spaces instead of indentations
useTabs: false,
// vue files script and style tags indentation
vueIndentScriptAndStyle: false,
};
相关
支持的节点.js版本
这一生态系统中的图书馆尽最大努力追踪 Node.js的释放时间表。 。 。 .
这里 关于为什么我们认为这很重要的文章。 。 。 .
捐款
说明: 请注意,该项目已连同《协助者行为守则》一起公布。 通过参加这个项目,你同意遵守其条款.
贷项
在阿诺利拉布制造的
这是一个开源项目,将永远可以自由使用。 如果你觉得很酷. 阿诺利拉布 是一个开发与AI工作室。 联系时间: 你好@anolilab.com 如果你需要帮助 这些技术 或者想打个招呼!
许可证
Anolilab 更漂亮的配置是开源软件,许可使用 麻省理工学院