Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

格式化带有条件编译的代码时出现异常 #20

Open
aliang888 opened this issue Jun 19, 2024 · 1 comment
Open

格式化带有条件编译的代码时出现异常 #20

aliang888 opened this issue Jun 19, 2024 · 1 comment

Comments

@aliang888
Copy link

format-error

左侧的逗号是在条件编译里面,格式化后,跑到外面了,正然就语法错误了

@zqy233
Copy link
Owner

zqy233 commented Jun 19, 2024

感谢反馈,已复现,测试该效果同vscode-prettier表现一致,非本插件问题。因为json中条件编译注释是uniapp团队自创的语法,正常json文件不支持注释语法,可以.prettierignore中添加该文件名,忽略该文件格式化,或者前往prettier仓库提问题(uniapp团队自创语法,非规范性语法,可能人家不会修复)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants