prettier外掛個人配置以及配置說明
阿新 • • 發佈:2021-11-13
// prettier.config.js
module.exports = { /** * @description 尾隨逗號 */ trailingComma: 'none', /** * @description 箭頭函式 * @example avoid x => x * @example always (x) => x */ arrowParens: 'avoid', /** * @description 程式碼最大長度 超過換行 */ printWidth:200, /** * @description 縮排行數 */ tabWidth: 4, useTabs: false, /** * @description 在結尾增加分號 */ semi: true, /** * @description 使用單引號 */ singleQuote: true, quoteProps: 'as-needed', /** * @description 使用jsx */ jsxSingleQuote: true,/** * @description 物件屬性之間是否需要空格 * @example true { foo: bar } * @example false {foo: bar} */ bracketSpacing: true, /** * @description jsx語法中的開始標籤是否換行顯示 */ bracketSameLine: false, proseWrap: 'never', htmlWhitespaceSensitivity: 'css', /** * @description vue 檔案 script 以及style標籤是否縮排*/ vueIndentScriptAndStyle: false, endOfLine: 'crlf' };