@10stars/config

中文文档
22.0.2发布于 2026/11/07近 30 天下载 6603
原始使用文档
文档目录4 节
  1. Shareable Configs
  2. React Compiler rules (browser config)
  3. Install
  4. Commands

@10stars/config

Shareable Configs

React Compiler rules (browser config)

react/globals, react/immutability, react/preserve-manual-memoization, react/refs and react/set-state-in-effect are off. They encode React Compiler semantics, and we build with Vite — nothing is auto-memoized, so render-time ref reads, idempotent module-scope caches and prop-ref writes are load-bearing house patterns rather than mistakes. preserve-manual-memoization reports that hand-written memoization stopped the compiler from optimizing, which cannot apply with no compiler in the pipeline — and hand-written useCallback/useMemo is required house style here.

react/purity stays on: an impure call during render is unstable under any build.

Install

  • Not intended for global installation
  • Use it as part of your project's devDependencies

Commands

Single-repository commands:

  • bunx config ts: typecheck one tsconfig.json in watch mode.
  • bunx config typecheck: typecheck one tsconfig.json once.
  • bunx config lint: format and lint one repository.

Run these commands from a parent directory containing repositories as immediate children:

  • bunx config tsAll: watch the root and immediate-child tsconfig.json files in one TypeScript build process. The latest complete cycle is written atomically to .typecheck-diagnostics.json. TypeScript build caches are stored under each project's ignored node_modules/.cache directory.
  • bunx config typecheckAll: typecheck the same projects once in one TypeScript build process.

Oxfmt and Oxlint discover nested tool configs. Child repository VCS ignore files are not guaranteed to apply from the parent process. Put required Oxfmt exclusions in formatIgnore of the repository's 10stars.config.ts (prepare regenerates .oxfmtrc.json from them) and Oxlint exclusions in .oxlintrc.json.

prepare writes a .husky/pre-commit that runs bun fmt --staged. List generated files a commit must not take stale (e.g. screenshot baselines) in generatedPaths of 10stars.config.ts, as git pathspecs, and the hook also blocks a commit when one of them changed after it was staged.

版本与发布记录

@10stars/config 共发布 236 个版本,首次发布于 2021/03/10;过去 12 个月发布了 100 个版本。

版本发布日期距今
22.0.2latest2026/11/07今天
22.0.12026/11/07今天
22.0.02026/10/317 天前
21.0.02026/10/299 天前
20.5.22026/10/2513 天前
20.5.12026/10/2216 天前

关于 @10stars/config 的常见问题

如何安装 @10stars/config?

在项目目录运行 npm install @10stars/config,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 config,可以用 npx config 直接运行。

@10stars/config 支持 TypeScript 吗?

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

@10stars/config 可以商用吗?

@10stars/config 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@10stars/config 的下载量有多少?

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

@10stars/config 还在维护吗?

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