[英]Prettier VS Code - how a JS object is formatted
I got this object:我得到了这个 object:
const map = {
'&': '&', '&': '&', '<': '<', '>': '>', '"': '"', ''': "'", '’': '’',
'‘': '‘', '–': '–', '—': '—', '…': '…', '”': '”'
};
And prettier automatically formats it to: prettier 会自动将其格式化为:
const map = {
'&': '&',
'&': '&',
'<': '<',
'>': '>',
'"': '"',
''': "'",
'’': '’',
'‘': '‘',
'–': '–',
'—': '—',
'…': '…',
'”': '”'
};
How can I configure it to stay as the original?如何配置它以保持原始状态?
The first code is a minified code.第一个代码是一个缩小的代码。 You should try to install the minify plugin for VSCode ad add a keyboard shortcut to minify your code as the first one.您应该尝试为 VSCode 广告安装 minify 插件,添加一个键盘快捷键以将您的代码作为第一个来缩小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.