/stylelint-config-moresec

stylelint-config rules for MoresecFE

Primary LanguageJavaScriptMIT LicenseMIT

stylelint-config-moresec

stylelint-config rules for MoresecFE

Installation

yarn add @moresec/stylelint-config-moresec -D

Usage

It is recommended to use with VSCode plugin stylelint-stzhang

{
  extends: ["@moresec/stylelint-config-moresec"],
  rules: {
    // 在这里可以自定义规则。但不推荐,有异议的地方建议提 PR,这样也是维持写此配置文件的初衷。
  }
}

Integrating with Prettier

// 1. 安装 Prettier
yarn add prettier --dev --exact
yarn add stylelint-prettier stylelint-config-prettier --dev

// 2. 配置 .stylelintrc 相关文件
{
  extends: [
    "@moresec/stylelint-config-moresec",
    "stylelint-prettier/recommended"
  ]
}
// 3. 例子
// 安装
yarn add stylelint stylelint-prettier stylelint-config-prettier -D
yarn add prettier --dev --exact
// .stylelintrc
{
  "extends": [
    "@moresec/stylelint-config-moresec",
    "stylelint-prettier/recommended"
  ]
}

Refers

Environment

Node.js >= 8

stylelint >= 12