@alleyinteractive/stylelint-config

中文文档
0.4.0发布于 2026/11/04GPL-2.0-or-laterES Module零依赖构建来源已验证近 30 天下载 1800

Alley's sharable stylelint config

原始使用文档
文档目录10 节
  1. Installation
  2. Usage
  3. Property order
  4. Extending the config
  5. Dependencies
  6. Changelog
  7. Development Process
  8. Contributing
  9. Releases
  10. Maintainers

Alley Stylelint Configuration

A set of stylelint configuration rules that extends the stylelint-config-sass-guidelines intended for use with SCSS syntax.

This stylelint config:

Installation

$ npm install @alleyinteractive/stylelint-config --save-dev

Usage

If you've installed @alleyinteractive/stylelint-config locally within your project, just set your stylelint config to:

{
    "extends": "@alleyinteractive/stylelint-config"
}

Property order

Properties must be in alphabetical order (order/properties-alphabetical-order). To sort existing stylesheets automatically, run:

$ npx stylelint --fix "**/*.scss"

Extending the config

Simply add a "rules" key to your config and add your overrides there.

For example, to change the block-no-empty to false and turn off the block-no-empty rule:

{
    "extends": "@alleyinteractive/stylelint-config",
    "rules": {
        "block-no-empty": false,
    }
}

Dependencies

This configuration has peer dependencies of stylelint, stylelint-config-sass-guidelines, and stylelint-order.

Changelog

0.0.1 – Initial release

Development Process

This package is developed as part of the Alley Scripts project on GitHub. The project is organized as a monorepo using npm workspaces and individual packages are published to npm under the @alleyinteractive organization.

Contributing

You can contribute to this project in several ways:

Releases

This project adheres to the Semantic Versioning 2.0.0 specification. All major, minor, and patch releases are published to npm and tagged in the repo. We will maintain separate branches for each minor release (e.g. block-editor-tools/0.1) to manage patch releases while keeping future development in the main branch.

Maintainers

This project is actively maintained by Alley Interactive. Like what you see? Come work with us.

Alley logo

版本与发布记录

@alleyinteractive/stylelint-config 共发布 6 个版本,首次发布于 2022/11/18;过去 12 个月发布了 3 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.0latest2026/11/044 天前
0.3.02026/10/2019 天前
0.2.02026/04/096 个月前
0.1.02025/07/221.3 年前
0.0.22023/02/173 年前
0.0.12022/11/183 年前

关于 @alleyinteractive/stylelint-config 的常见问题

@alleyinteractive/stylelint-config 是什么?

Alley's sharable stylelint config

如何安装 @alleyinteractive/stylelint-config?

在项目目录运行 npm install @alleyinteractive/stylelint-config,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:stylelint(^17.6.0)、stylelint-order(^8.0.0)、stylelint-config-sass-guidelines(^13.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@alleyinteractive/stylelint-config 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/alleyinteractive__stylelint-config 是否存在。

@alleyinteractive/stylelint-config 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@alleyinteractive/stylelint-config 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.0.0 <26.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@alleyinteractive/stylelint-config 可以商用吗?

@alleyinteractive/stylelint-config 使用 GPL-2.0-or-later 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以兼容的 GPL 许可开源。仅在内部使用、不对外分发时不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@alleyinteractive/stylelint-config 的下载量有多少?

根据 npm 官方下载统计,@alleyinteractive/stylelint-config 在 2026/10/06 – 2026/11/04 这 30 天内被下载 1,800 次,日均约 60 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@alleyinteractive/stylelint-config 还在维护吗?

最新版本 0.4.0 发布于 2026/11/04(4 天前);至今共发布 6 个版本,其中过去 12 个月发布了 3 个;首次发布于 2022/11/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。