# @pobammer-ts/small-rules 中文文档

规范地址：https://npmcn.com/package/%40pobammer-ts/small-rules/

版本：3\.11\.0
npm 元数据更新时间：2026-11-02T04:28:24.552Z
中文译文更新时间：2026-11-02T05:11:39.030Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40pobammer-ts/small-rules
原文对照：https://npmcn.com/package/%40pobammer-ts/small-rules/?lang=original
项目主页：https://docs.howmanysmall.com/small-rules/
源码仓库：https://github.com/howmanysmall/small-rules

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

- 包体积（解压后）：622 kB，6 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=22\.12\.0
- 运行依赖：7 个
- peer 依赖：typescript \>=5 \<8
- 首次发布：2026-06-15T17:09:52.992Z
- 最新版本发布：2026-11-02T04:28:24.239Z
- 已发布版本数：45（近 12 个月 45 个）

## 中文简介

用于检测roblox-ts项目的各种oxlint本地规则。

## 安装

```sh
npm install @pobammer-ts/small-rules
```

也可以使用：`pnpm add @pobammer-ts/small-rules`、`yarn add @pobammer-ts/small-rules`、`bun add @pobammer-ts/small-rules`

## README

# `@pobammer-ts/small-rules`

**的原生lint规则 [roblox-ts](https://roblox-ts.com/) 项目**

[![npm version](https://img.shields.io/npm/v/@pobammer-ts/small-rules?logo=npm&color=cb3837)](https://www.npmjs.com/package/@pobammer-ts/small-rules) [![npm downloads](https://img.shields.io/npm/dm/@pobammer-ts/small-rules?logo=npm&color=cb3837)](https://www.npmjs.com/package/@pobammer-ts/small-rules) [![package size](https://img.shields.io/npm/unpacked-size/@pobammer-ts/small-rules?label=package%20size)](https://www.npmjs.com/package/@pobammer-ts/small-rules) [![Rules](https://img.shields.io/badge/rules-109-blueviolet)](https://docs.howmanysmall.com/small-rules/rules/) [![CI](https://github.com/howmanysmall/small-rules/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/howmanysmall/small-rules/actions/workflows/ci.yaml) [![codecov](https://codecov.io/gh/howmanysmall/small-rules/graph/badge.svg)](https://codecov.io/gh/howmanysmall/small-rules) [![Bundle Size](https://github.com/howmanysmall/small-rules/actions/workflows/bundle-size.yaml/badge.svg?event=pull_request)](https://github.com/howmanysmall/small-rules/actions/workflows/bundle-size.yaml) [![pkg.pr.new](https://pkg.pr.new/badge/howmanysmall/small-rules)](https://pkg.pr.new/~/howmanysmall/small-rules) [![License](https://img.shields.io/npm/l/@pobammer-ts/small-rules?color=blue)](https://github.com/howmanysmall/small-rules/blob/main/LICENSE)

[![TypeScript](https://img.shields.io/badge/TypeScript-5.0%E2%80%938.0-3178c6?logo=typescript)](https://www.typescriptlang.org/) [![Node.js](https://img.shields.io/badge/Node.js-%5E20.19%20%7C%20%E2%89%A522.12-339933?logo=node.js)](https://nodejs.org/) [![Oxlint](https://img.shields.io/badge/linter-Oxlint-f9801b?logo=oxlint)](https://oxc.rs/) [![ESLint](https://img.shields.io/badge/linter-ESLint-4B32C3?logo=eslint)](https://eslint.org/) [![Biome](https://img.shields.io/badge/formatter-Biome-609d6c?logo=biome)](https://biomejs.dev/) [![oxfmt](https://img.shields.io/badge/formatter-oxfmt-f9801b?logo=oxlint)](https://github.com/oxc-project/oxc) [![fallow](https://img.shields.io/badge/code%20quality-fallow-6aa84f)](https://docs.fallow.tools/)

* * *

## 安装

```bash
ni -D @pobammer-ts/small-rules
```

> 需要 [Oxlint](https://oxc.rs/) **v1.69.0 +**,打印稿 **5 - <8**，以及Node.js **≥20.19** 或者 **≥22.12**.

## 配置

将插件注册到 `.oxlintrc.json` 然后启用你想要的规则：

```json
{
  "plugins": ["@pobammer-ts/small-rules"],
  "rules": {
    "small-rules/no-print": "error",
    "small-rules/no-warn": "error"
  }
}
```

启用规则为 `small-rules/<rule-name>`． 选择适合您项目的子集-还没有批量选择。

## 规则

浏览 [**完整规则目录→**](https://docs.howmanysmall.com/small-rules/rules/) 用于说明、选项、诊断和示例。

## 许可证

MIT©HowManySmall

包含麻省理工学院许可的代码 [dmmulroy / anti-slop](https://github.com/dmmulroy/anti-slop). 看到 [THIRD-PARTY-NOTICES.md](https://npmcn.com/package/%40pobammer-ts/small-rules/THIRD-PARTY-NOTICES.md).

## 常见问题

### @pobammer-ts/small-rules 是什么？

用于检测roblox-ts项目的各种oxlint本地规则。

### 如何安装 @pobammer-ts/small-rules？

在项目目录运行 npm install @pobammer-ts/small-rules，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：typescript（\>=5 \<8）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @pobammer-ts/small-rules 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @pobammer-ts/small-rules 支持 ESM 还是 CommonJS？

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

### @pobammer-ts/small-rules 需要什么版本的 Node\.js？

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

### @pobammer-ts/small-rules 可以商用吗？

@pobammer-ts/small-rules 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @pobammer-ts/small-rules 还在维护吗？

最新版本 3\.11\.0 发布于 2026/11/02（1 天前）；至今共发布 45 个版本，其中过去 12 个月发布了 45 个；首次发布于 2026/06/16。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

