npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hootool/stylelint-config

v0.1.0

Published

CSS/SCSS/Less 规则(适配 Web 和 RN StyleSheet)

Downloads

109

Readme

@hootool/stylelint-config

CSS/SCSS/Less 统一样式规则配置,基于 Stylelint v16

特性

  • stylelint-config-standard:CSS 标准规则
  • stylelint-config-recess-order:属性排序(RECESS 顺序)
  • stylelint-config-standard-scss:SCSS 规则(仅作用于 .scss 文件)
  • stylelint-config-standard-less:Less 规则(仅作用于 .less 文件)
  • 兼容 Tailwind CSS 指令(@tailwind@apply@screen 等)

安装

pnpm add -D @hootool/stylelint-config stylelint

使用

// .stylelintrc.json
{
  "extends": ["@hootool/stylelint-config"]
}

运行检查:

stylelint "**/*.{css,scss,less}"

配置结构

采用 overrides 按文件类型分离语法配置,避免 SCSS 规则误应用到 Less 文件:

  • 顶层:stylelint-config-standard + recess-order(作用于所有样式文件)
  • **/*.scss:叠加 stylelint-config-standard-scss
  • **/*.less:叠加 stylelint-config-standard-less

主要规则

  • declaration-block-no-duplicate-properties:禁止重复属性
  • order/properties-order:属性按 RECESS 顺序排列
  • length-zero-no-unit:0 值不带单位
  • color-no-invalid-hex:禁止非法十六进制颜色
  • no-descending-specificity:关闭(实际项目中难以避免)

注意

Stylelint v16 已移除所有 stylistic 格式化规则(如 indentationstring-quotes),格式化统一交给 Prettier 处理。