一、解决方法
1 2 3 4 5 |
// .vscode > settings.json { "scss.lint.unknownAtRules": "ignore", "css.lint.unknownAtRules": "ignore" } |
二、安装stylelint-config-standard
1 |
npm i stylelint-config-standard -D |
三、配置stylelint.config.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
module.exports = { extends: ['stylelint-config-recommended'], rules: { "at-rule-no-unknown": [ true, { ignoreAtRules: [ "tailwind", "apply", "variants", "responsive", "screen", ], }, ], "declaration-block-trailing-semicolon": null, "no-descending-specificity": null, }, }; |
四、参考
https://github.com/tailwindlabs/tailwindcss/discussions/5258
https://stackoverflow.com/questions/62118325/how-do-you-get-rid-of-these-sass-linting-errors-when-using-tailwind-css