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-zzjtnb

v0.0.8

Published

Stylelint configuration aimed to have balanced aspects.

Readme

✨ 功能特点

🎨 现代 CSS 支持

  • ✅ 最新 CSS 标准和最佳实践
  • 🎯 逻辑化属性排序
  • 🧹 整洁一致的代码风格
  • 🚀 性能优化

🔥 框架兼容

  • 💚 Vue 3 SFC <style>
  • 🎨 SCSS/Sass 语法支持
  • ⚡ UnoCSS & Tailwind 友好
  • 📄 HTML 内联样式

🛠️ 坚实的基础

| 包 | 用途 | |---------|---------| | stylelint-config-standard | CSS 最佳实践 | | stylelint-config-standard-scss | SCSS/Sass 支持 | | stylelint-config-recommended-vue | Vue 3 SFC 支持 | | stylelint-config-html | HTML 内联样式 | | stylelint-config-clean-order | 逻辑属性排序 |

📋 依赖要求

| 包 | 版本 | 兼容性 | |---------|---------|---------------| | Stylelint | >=16.19.1 | ✅ 兼容所有 16.x 及更高版本 |

📦 安装

# 📦 npm
npm install stylelint stylelint-config-zzjtnb -D

# 🧶 yarn
yarn add stylelint stylelint-config-zzjtnb -D

# 🚀 pnpm(推荐)
pnpm add stylelint stylelint-config-zzjtnb -D

[!TIP] 确保 stylelint 版本 >=16.19.1 以获得最佳体验!

🚀 使用方法

在项目根目录创建 .stylelintrc.js 文件:

CommonJS

module.exports = {
  extends: ['stylelint-config-zzjtnb'],
  rules: {
    // 🎨 在这里添加你的自定义规则(可选)
  }
}

ESM

export default {
  extends: ['stylelint-config-zzjtnb'],
  rules: {
    // 🎨 在这里添加你的自定义规则(可选)
  }
}

[!NOTE] 就这么简单!🎉 现在你的样式已经受到全面的 lint 保护了。

💻 VS Code 推荐设置

步骤 1: 安装官方 Stylelint 扩展

步骤 2:.vscode/settings.json 中添加以下配置:

{
  "css.validate": false,
  "scss.validate": false,
  "stylelint.validate": ["css", "scss", "vue", "html"],
  "editor.codeActionsOnSave": {
    "source.fixAll.stylelint": "explicit"
  }
}

[!TIP] 现在享受保存时自动格式化的便利!🎉

📖 包含内容

🧩 配置亮点

| 功能 | 说明 | |------|------| | 🎨 属性排序 | 通过 stylelint-config-clean-order 进行逻辑分组 | | 🧹 整洁格式 | 属性组之间无多余空行 | | 📐 标准规则 | 内置官方 CSS & SCSS 标准 | | 💚 Vue 支持 | SFC <style> 块的正确语法检测 | | ⚡ 现代 CSS | UnoCSS、Tailwind、容器查询、嵌套 | | 🎭 伪元素 | 最新的 CSS 伪类和伪元素 | | 🔧 可定制 | 易于扩展自定义规则 |

🎨 智能默认值示例

/* ✅ 属性会自动按逻辑顺序排列 */
.component {
  /* 定位 */
  position: relative;
  top: 0;

  /* 盒模型 */
  display: flex;
  width: 100%;
  padding: 1rem;

  /* 排版 */
  font-size: 1rem;
  color: #333;

  /* 视觉 */
  background: white;
  border-radius: 8px;
}

🎨 自定义配置

默认情况下,我们通过移除属性组之间的额外空行,让你的代码紧凑整洁

如果你更喜欢带间距的属性,可以在配置中添加:

module.exports = {
  extends: ['stylelint-config-zzjtnb'],
  rules: {
    'declaration-empty-line-before': 'always',
    'at-rule-empty-line-before': 'always',
  }
}
module.exports = {
  extends: ['stylelint-config-zzjtnb'],
  rules: {
    // 关闭特定规则
    'color-hex-length': null,

    // 调整规则严重性
    'declaration-block-no-duplicate-properties': 'warning',

    // 配置规则选项
    'selector-max-id': [1, { severity: 'warning' }],
  }
}

[!NOTE] 查看 Stylelint 规则文档 了解所有可用选项。

💖 为什么选择这个配置?

| | | | |:---:|---|---| | ⚡ | 快速设置 | 一行安装,零配置启动 | | 🎯 | 有主见 | 基于实际使用精心打造的默认配置 | | 🔧 | 灵活 | 易于根据需求自定义和扩展 | | 🌟 | 现代化 | 为 Vue 3、UnoCSS 和前沿 CSS 而构建 |

📄 许可证

MIT 许可证 © 2022-PRESENT 争逐