@denaro-config/stylelint

1.4.8 • Public • Published

@denaro-config/stylelint

🎉 前端工程化中的 stylelint 通用配置, 用于规范 css 代码质量。

npm (scoped) NPM

GitHub repo size GitHub Repo stars GitHub issues GitHub top language

npm jsDelivr hits (npm scoped)

参考官网地址

stylelint

安装至您的项目

npm install -D @denaro-config/stylelint
# or
pnpm install -D @denaro-config/stylelint
# or
yarn add -D @denaro-config/stylelint

使用

在项目根目录下创建 .stylelintrc 文件, 参考配置内容如下:

{
  "extends": ["@denaro-config/stylelint"]
}

忽略检查

在项目根目录下创建 .stylelintignore 文件, 参考配置内容如下:

node_modules
dist
lib

结合 lint-staged、husky 使用

package.json 中添加以下内容

{
  "scripts": {
    "stylelint": "stylelint \"./**/*.{css,vue,html}\" --fix"
  },
  "lint-staged": {
    "*.{css,vue,html}": "stylelint --write --ignore-unknown"
  }
}

Package Sidebar

Install

npm i @denaro-config/stylelint

Weekly Downloads

122

Version

1.4.8

License

MIT

Unpacked Size

7.16 kB

Total Files

5

Last publish

Collaborators

  • vxhly