vscode rn代码格式化配置

安装Beautify和React-beautify扩展程序,并在项目根目录创建配置文件.jsbeautifyrc,并复制下面代码到此配置文件里:

 {
     "mode": "beautify",
     "methodchain": "chain",
     "ternaryline": true,
     "formatObject": "default",
     "newline": true,
     "wrap": 120,
     "html": {
         "tagsort": true
     }
 }

效果还不错,有其他格式化需求的可以去研究Beautify插件的属性,给个链接好了=>点这里哟

posted @ 2017-08-18 17:13  无所事事者爱嘲笑  阅读(1280)  评论(0编辑  收藏  举报