Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 486 Bytes

README.md

File metadata and controls

35 lines (30 loc) · 486 Bytes

stylelint

stylelint config presets

Install

pnpm i stylelint prettier @eye-socket/stylelint-config -D

Usage

  1. 配置 stylelint 配置文件
// .stylelintrc
{
  "extends": "@eye-socket/stylelint-config"
}
  1. 配置 vscode 保存自动格式化
// .vscode/settings.json
{
  "stylelint.validate": [
    "css",
    "less",
    "postcss",
    "scss",
    "html"
  ],
  "editor.codeActionsOnSave": {
    "source.fixAll.stylelint": true
  }
}