# @alleyinteractive/stylelint-config 中文文档

规范地址：https://npmcn.com/package/%40alleyinteractive/stylelint-config/

版本：0\.4\.0
npm 元数据更新时间：2026-11-04T13:05:55.015Z
中文译文更新时间：2026-11-08T10:30:18.675Z
软件包许可：GPL-2\.0-or-later

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40alleyinteractive/stylelint-config
原文对照：https://npmcn.com/package/%40alleyinteractive/stylelint-config/?lang=original
项目主页：https://github.com/alleyinteractive/alley-scripts/tree/main/packages/stylelint-config
源码仓库：https://github.com/alleyinteractive/alley-scripts

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：5.8 kB，4 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=22\.0\.0 \<26\.0\.0
- 运行依赖：0 个
- peer 依赖：stylelint ^17\.6\.0，stylelint-order ^8\.0\.0，stylelint-config-sass-guidelines ^13\.0\.0
- 首次发布：2022-11-18T12:35:51.963Z
- 最新版本发布：2026-11-04T13:05:54.512Z
- 近 30 天下载量：1800（2026-10-06 至 2026-11-04，npm 官方下载统计）
- 已发布版本数：6（近 12 个月 3 个）

## 中文简介

Alley可口的风格林特配置

## 安装

```sh
npm install @alleyinteractive/stylelint-config
```

也可以使用：`pnpm add @alleyinteractive/stylelint-config`、`yarn add @alleyinteractive/stylelint-config`、`bun add @alleyinteractive/stylelint-config`

## README

# Alley 样式林配置

一组 [样式lint](https://stylelint.io/) 扩展 [样式lint - 配置 - ass - 指南](https://github.com/bjankord/stylelint-config-sass-guidelines) 用于SCSS语法.

此样式林特配置 :

-   扩展 [样式lint - 配置 - ass - 指南](https://github.com/bjankord/stylelint-config-sass-guidelines) 点燃。 您可以查看文档中配置的用于 [工程中样式lint- 配置- ass- 指针](https://github.com/bjankord/stylelint-config-sass-guidelines/tree/main#documentation)。 。 。 .
-   拥有对等依赖 [样式lint](https://github.com/stylelint/stylelint)。 。 。 .
-   拥有对等依赖 [样式lint - 配置 - ass - 指南](https://github.com/bjankord/stylelint-config-sass-guidelines)。 。 。 .
-   拥有对等依赖 [样式lint 顺序](https://github.com/hudochenkov/stylelint-order)。 。 。 .

## 安装

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

## 使用量

如果你已经安装 `@alleyinteractive/stylelint-config` 在你的项目内, 刚刚设置你的 `stylelint` 配置为 :

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

### 财产令

属性必须按字母顺序排列( N)`order/properties-alphabetical-order`) (中文(简体) ). 要自动排序已有的样式表, 运行 :

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

### 扩展配置

只要加一个 `"rules"` 键入您的配置并添加您的覆盖.

例如,改变 `block-no-empty` 以假取出并关闭 `block-no-empty` 规则:

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

## 依赖关系

此配置具有对等依赖性 : [样式lint](https://github.com/stylelint/stylelint), (中文(简体) ), [样式lint - 配置 - ass - 指南](https://github.com/bjankord/stylelint-config-sass-guidelines),以及 [样式lint 顺序](https://github.com/hudochenkov/stylelint-order)。 。 。 .

## 更改日志

0.0.1 - 初步释放

## 发展进程

这个软件包是作为以下文件的一部分开发的: [Alley 脚本](https://github.com/alleyinteractive/alley-scripts) gitHub 上的项目。 该项目是作为一个单簧管组织,使用 [npm 工作空间](https://docs.npmjs.com/cli/v7/using-npm/workspaces) 和单个软件包在 [@ alley 交互](https://www.npmjs.com/org/alleyinteractive) 组织.

### 捐款

您可通过多种方式为该项目做出贡献:

-   访问主 [Alley 脚本 GitHub repo](https://github.com/alleyinteractive/alley-scripts) 改为 [打开一个问题](https://github.com/alleyinteractive/alley-scripts/issues/new) 或者提交公关.
-   Alley员工可在 [#ux 开发](https://alleyinteractive.slack.com/archives/C58QWRBL2) 在Slack的频道.

### 释放

本项目遵循 [语义版 2.0.0](https://semver.org/) 规格。 所有主要的、次要的和补丁的发布都发布到npm,并在repo中贴上标签。 我们将为每个小版本(例如:块-编辑工具/0.1)保持单独的分支,以管理补丁释放,同时将未来的开发保持在 `main` 树枝.

## 维护者

这个项目由下列机构积极维持: [Alley 交互式](https://github.com/alleyinteractive)就像你看到的一样? [跟我们一起工作吧](https://alley.com/careers/)。 。 。 .

![Alley logo](https://avatars.githubusercontent.com/u/1733454?s=200&v=4)

## 常见问题

### @alleyinteractive/stylelint-config 是什么？

Alley可口的风格林特配置

### 如何安装 @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 和提交记录判断。

