You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hippo4j/threadpool/console-new/.prettierrc.js

34 lines
2.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

module.exports = {
// 1.一行代码的最大字符数默认是80(printWidth: <int>)
printWidth: 120,
// 2.tab宽度为2空格(tabWidth: <int>)
tabWidth: 2,
// 3.是否使用tab来缩进我们使用空格(useTabs: <bool>)
useTabs: false,
// 4.结尾是否添加分号false的情况下只会在一些导致ASI错误的其工况下在开头加分号我选择无分号结尾的风格(semi: <bool>)
semi: true,
// 5.使用单引号(singleQuote: <bool>)
singleQuote: true,
// 6.object对象中key值是否加引号quoteProps: "<as-needed|consistent|preserve>"as-needed只有在需求要的情况下加引号consistent是有一个需要引号就统一加preserve是保留用户输入的引号
quoteProps: 'as-needed',
// 7.在jsx文件中的引号需要单独设置jsxSingleQuote: <bool>
jsxSingleQuote: false,
// 8.尾部逗号设置es5是尾部逗号兼容es5none就是没有尾部逗号all是指所有可能的情况需要node8和es2017以上的环境。trailingComma: "<es5|none|all>"
trailingComma: 'es5',
// 9.object对象里面的key和value值和括号间的空格(bracketSpacing: <bool>)
bracketSpacing: true,
// 10.jsx标签多行属性写法时尖括号是否另起一行(jsxBracketSameLine: <bool>)
jsxBracketSameLine: false,
// 11.箭头函数单个参数的情况是否省略括号默认always是总是带括号arrowParens: "<always|avoid>"
arrowParens: 'avoid',
// 12.range是format执行的范围可以选执行一个文件的一部分默认的设置是整个文件rangeStart: <int> rangeEnd: <int>
rangeStart: 0,
rangeEnd: Infinity,
// 18. vue script和style标签中是否缩进,开启可能会破坏编辑器的代码折叠
vueIndentScriptAndStyle: false,
// 19. endOfLine: "<lf|crlf|cr|auto>" 行尾换行符,默认是lf,
endOfLine: 'auto',
// 20.embeddedLanguageFormatting: "off",默认是auto,控制被引号包裹的代码是否进行格式化
embeddedLanguageFormatting: 'off',
};