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

🙃如何禁用某个“错误提示”。这个错误提示在pug中出现不应该出现的地方。 #1525

Closed
dabaii opened this issue Jun 30, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@dabaii
Copy link

dabaii commented Jun 30, 2022

版本信息:
"vite": "^2.9.9",
"pug": "^3.0.2",
"vue": "^3.2.25"

volar:v.0.38.2

问题:
在pug中,使用下面语法会出现 “Duplicate attribute.” 的错误警告。

虽然这个警告在 html中是非常有必要的。

但是在pug中classname会合并,生成的html只并不会有多个classname属性。所以希望在使用pug中,能够针对class属性不出现 “Duplicate attribute.” 错误警告。 这个需要如何配置?

.box(class="grid grid-cols-3 grid-flow-row gap-4 w-[100px]  bg-red-400 ml-[100px]") hello

或者说,有没有办法配置, “Duplicate attribute.”这个检查忽略掉。

当然我可以使用🙃🙃🙃

div(class="box grid grid-cols-3 grid-flow-row gap-4 w-[100px]  bg-red-400 ml-[100px]") hello

这种方式避免这个错误提示。

为什么会这样奇葩的写代码方式:
在项目开发中使用 pug + tailwindcss(或者同类型原子类css框架),希望自定义样式名,和工具库提供的样式名不柔和在一起。这样看起来更加简洁方便。

@dabaii
Copy link
Author

dabaii commented Jul 16, 2022

👍🏻👍🏻👍🏻👍🏻

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

No branches or pull requests

2 participants