prettier插件個人配置以及配置說明


// 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' };

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM