css - WebStorm 中的 Stylelint 修复

标签 css webstorm stylelint

我在 WebStorm (2018.2.3) 的 Settings -> Languages and Frameworks -> Stylesheets -> Stylelint 中配置了 stylelint。我的根目录中有 .stylelintrc。

现在 stylelint 成功地强调了我的 css 文件中的错误。 但是有没有办法在 WebStorm 帮助下修复它们(无需在控制台中运行 --fix 命令)?

最佳答案

我在设置中创建了外部工具 |工具 |外部工具,例如:

enter image description here

然后在此处添加此命令的快捷键映射:

enter image description here

所以现在它修复了键盘映射按下的整个文件

关于css - WebStorm 中的 Stylelint 修复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54304313/

相关文章:

javascript - 如何创建 3 个可调整的 div?

javascript - WebStorm 无法识别动态方法

ecmascript-6 - 如何告诉 WebStorm 模块已安装

css - 让 Stylelint 在某些情况下忽略缩进?

html - 如何在 div 元素上动态隐藏或显示滚动条?

html - 响应式网格系统——他们为什么不排队?

html - 防止在双击时选择多个 html 元素

javascript - 使用 Grunt 的 Node JS 项目,生成的 js 文件有 ReferenceError : window is not defined

css - map.get($foo, bar) 标记为 "semi-colon expectedscss(css-semicolonexpected)"

css - Stylelint 不会在 VSCode 中标记错误