我遵循guide https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint安装stylelint
vscode 扩展,但它在我的电脑上不起作用。
我非常确定我遵循了所有必要的步骤。
- 安装扩展。
- 在用户设置中禁用内置的 linter。
- 使用 npm 安装 stylelint 及其标准配置。
- Create a .stylelintrc.json configuration file in the root of my project.
- Run stylelint from command-line.
But the extention still not automatically validate the css, what is going wrong?
![screenshot of no problems](https://i.stack.imgur.com/o0RsR.png)
读完后guide https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint我再次找到了设置stylelint.config
并理解它的定义:
设置 stylelint 配置选项。请注意,启用此选项后,stylelint 不会加载配置文件。
于是我看了一下我的vscode用户设置,哦,stylelint.config: {}
。将其更改为 null 后,stylelint 会立即自动验证 css 文件。
Phew~
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)