@18f/identity-stylelint-config

中文文档
6.0.0发布于 2026/08/05CC0-1.0CommonJS近 30 天下载 3033

Stylelint shareable configuration for Login.gov CSS/SASS standards

原始使用文档
文档目录3 节
  1. Installation
  2. Usage
  3. License

@18f/identity-stylelint-config

Stylelint shareable configuration for Login.gov CSS/SASS standards.

These configurations largely inherit from the TTS CSS coding standards, pre-bundled with recommended rulesets and extended to provide support for Login.gov-specific implementation choices.

Installation

Install using NPM or Yarn. Stylelint and Prettier are required as peer dependencies and should be installed if it is not already.

npm install --save-dev @18f/identity-stylelint-config stylelint prettier

Usage

Create a .stylelintrc.json configuration file in the root of your project and extend this configuration:

{
  "extends": "@18f/identity-stylelint-config"
}

When you next run stylelint, it will apply the configured rules.

License

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request or issue, you are agreeing to comply with this waiver of copyright interest.

版本与发布记录

@18f/identity-stylelint-config 共发布 7 个版本,首次发布于 2021/12/09;过去 12 个月发布了 1 个版本。

版本发布日期距今
6.0.0latest2026/08/053 个月前
5.0.0-beta.1beta2024/05/082 年前
4.1.02024/05/072 年前
4.0.02024/02/222 年前
3.0.02023/11/202 年前
2.0.02023/04/183 年前

关于 @18f/identity-stylelint-config 的常见问题

@18f/identity-stylelint-config 是什么?

Stylelint shareable configuration for Login.gov CSS/SASS standards

如何安装 @18f/identity-stylelint-config?

在项目目录运行 npm install @18f/identity-stylelint-config,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:prettier(>=3.0.0)、stylelint(^17.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@18f/identity-stylelint-config 支持 TypeScript 吗?

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

@18f/identity-stylelint-config 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@18f/identity-stylelint-config 可以商用吗?

@18f/identity-stylelint-config 使用 CC0-1.0 许可。作者放弃著作权,可不受限制地使用。以上为概括,不构成法律意见,请以许可原文为准。

@18f/identity-stylelint-config 的下载量有多少?

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

@18f/identity-stylelint-config 还在维护吗?

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