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

stylelint-config-re

v1.1.0

Published

Shareable stylelint config enforcing CSS/SCSS standards with strict style and SCSS-aware rules

Readme

stylelint-config-re

Enforces CSS/SCSS standards via a curated stylelint config: default severity warning with declaration-block-trailing-semicolon promoted to error; possible-errors category enabled (with at-rule-no-unknown overridden by the SCSS plugin to allow @use/@forward/@mixin/@include); stylistic rules for 2-space indent, brace placement, lowercase short hex, 100-char line limit; CSS Modules pseudo-class ignores (global/local/export); rpx (WeChat mini-program) allowed as a length unit.

安装

需要先行安装 stylelintstylelint-scss

npm install stylelint-config-re stylelint stylelint-scss --save-dev

Requires stylelint@^14.0.0 and stylelint-scss@^4.0.0 as peer dependencies.

使用

.stylelintrc 中继承本包:

{
  "extends": "stylelint-config-re"
}

(JS or YAML equivalents also work — stylelint reads .stylelintrc.js / .stylelintrc.yaml / .stylelintrc.json / stylelint.config.js.)

验证配置

需要查看合并后的完整配置时,可以打印出来:

npx stylelint --print-config "**/*.css" > /tmp/stylelint-config.json

测试

本包自带三层验证。运行 npm test(包目录下)会依次执行:

  1. Node 形态检查(__tests__/smoke.js)—— 直接 require('../index.js') 并断言关键字段。
  2. Jest 套件(__tests__/rules-validate.test.js)—— 用真实 stylelint 对 5 个 fixture 跑规则:CSS / SCSS / LESS / CSS Modules / essential。
  3. CLI 引擎检查(__tests__/smoke-cli.js)—— 调用 stylelint CLI 引擎验证 2 个 clean fixture(index.css/css-module.scss → exit 0)和 1 个反向 fixture(bad.css 缺尾分号触发 declaration-block-trailing-semicolon 错误 → exit 2)。

License

MIT © 2024 sophiaa