【发布时间】:2019-11-20 09:13:42
【问题描述】:
在 VS Code 中使用更漂亮的扩展存在问题, 当我写这个时:
const result = await pool
.request()
.query('select NumberPlate, ID, TimeStamp from RESULTS order by ID');
并保存文件,它变成这样的一行:
const result = await pool.request().query('select NumberPlate, ID, TimeStamp from RESULTS order by ID');
在更漂亮的配置中使用以下配置:
{
"git.confirmSync": false,
"editor.minimap.enabled": false,
"window.zoomLevel": 0,
"liveServer.settings.donotShowInfoMsg": true,
"workbench.startupEditor": "newUntitledFile",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"editor.formatOnSave": true,
"prettier.printWidth": 200,
"prettier.singleQuote": true,
"prettier.arrowParens": "always",
"editor.tabSize": 2,
"editor.tabCompletion": "on"
}
有没有办法避免这种情况发生?
谢谢!
【问题讨论】:
-
将 printWidth 设置为较小的值?
-
这可能是一个很好的解决方法,但它会导致其他方面的不便。你认为这可能是一件很容易解决的事情。感谢您的建议。
-
我一直想知道为什么他们称之为“更漂亮”。它不应该被称为“丑陋者”吗?它似乎只会使我的代码变得丑陋。
标签: javascript express prettier