Rom*_*LTU 6 css vue.js tailwind-css
如何正确配置 Tailwind CSS 和 VS Code 以至少禁用 VueJS 单文件组件 (vue-cli) 内有关 at-rule 和空标记错误的错误?
<template>
...
</template>
<style lang="scss">
body {
// } expected
@apply font-source pt-4;
} // at-rule or selector expected
h5,h4,h3,h2,h1 {
// } expected
@apply font-pt font-bold;
} // at-rule or selector expected
</style>
Run Code Online (Sandbox Code Playgroud)
小智 8
我在本指南的帮助下得到了它
总长DR
安装 VS Code 插件 stylelint (发布者名称:stylelint)
禁用项目的 scss / css 验证。按 F1 并搜索“settings json”。
设置.json
"scss.validate": false
"css.validate": false
Run Code Online (Sandbox Code Playgroud)
stylelint.config.js
module.exports = {
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['tailwind', 'apply', 'variants', 'responsive', 'screen']
}
],
'declaration-block-trailing-semicolon': null,
'no-descending-specificity': null
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4094 次 |
| 最近记录: |