格式化vue组件内的script时自动加""号和分号 ,这个和eslint的standard规范冲突,请告诉我怎么配置才能正常格式化
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
安装这个插件,然后在修改设置:
"prettier.singleQuote": true,
"prettier.semi": false
html格式化错乱可以修改如下配置:
"vetur.format.defaultFormatter.html": "js-beautify-html"
需要安装这个插件:https://marketplace.visualstudio.com/items?itemName=lonefy.vscode-JS-CSS-HTML-formatter
把js的设置切换回vscode-typescript
"vetur.format.defaultFormatter.js": "vscode-typescript"
prettier 这个插件不能随便装,他会把你的less/css 文件给格式化了
@wangzhipeng404 老铁你这个方法好用吗?
Zeus notifications@github.com于2017年10月25日 周三09:09写道:
@wangzhipeng404 https://github.com/wangzhipeng404 老铁你这个方法好用吗?
—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/vuejs/vetur/issues/483#issuecomment-339182358, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFtjKJCnaF_-C2GsB1wcxZzwfVS2jY65ks5svopdgaJpZM4P-5k7
.好用
>
@Zeus-Iqd 两种方式都可以,只不过格式化内容的格式略有不同
tkggusraqk notifications@github.com于2017年10月25日 周三09:34写道:
@Zeus-Iqd https://github.com/zeus-iqd 两种方式都可以,只不过格式化内容的格式略有不同
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vetur/issues/483#issuecomment-339186084, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFtjKLNPi0hjsFg1QZfletYPAXDoQ-Omks5svpAZgaJpZM4P-5k7
.其实区别就在InsertSpaceBeforeFunctionParenthesis,prettier没有这个,导致跟原来的eslint规则冲突了
Most helpful comment
把js的设置切换回vscode-typescript
"vetur.format.defaultFormatter.js": "vscode-typescript"