@cleeviox/tsconfig

中文文档
0.2.1发布于 2026/05/27ES Module零依赖近 30 天下载 2354

TypeScript configuration used on CleevioX projects

原始使用文档
文档目录9 节
  1. TypeScript configuration used on CleevioX projects
  2. Installation
  3. Usage
  4. Library
  5. App
  6. Node.js
  7. Next.js
  8. Nest.js
  9. Root
CleevioX Logo

TSCONFIG

NPM Version

TypeScript configuration used on CleevioX projects

Installation

bun add --dev @cleeviox/tsconfig typescript

In a monorepo, install the package in the root, then create configs in each workspace.

Usage

Use one of the following configurations by creating a tsconfig.json file relative to its root based on your need:

Library

Used for workspaces, which contain pieces of code, which are meant to be reusable, for instance packages/utils.

{
  "extends": "@cleeviox/tsconfig/library",
  "include": ["**/*.js", "**/*.ts", "**/*.tsx"],
  "exclude": ["dist", "node_modules"]
}

If you intend to distribute your workspace, you should also add a tsconfig.build.json file, which actually emits files:

{
  "compilerOptions": {
    "noEmit": false,
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "extends": "./tsconfig.json",
  "include": ["./src"],
  "references": []
}

Then build your package by specifying which config to use:

# package.json
"scripts": {
    "build": "tsc --build tsconfig.build.json"
  }

App

Used for react applications.

{
  "extends": "@cleeviox/tsconfig/app",
  "include": ["**/*.js", "**/*.ts", "**/*.tsx"],
  "exclude": ["build", "node_modules"]
}

Node.js

Used for nodejs projects which do not rely on any frameworks. For nestjs use this config

{
  "extends": "@cleeviox/tsconfig/nodejs",
  "include": ["**/*.js", "**/*.ts", "**/*.tsx"],
  "exclude": ["build", "node_modules"]
}

Next.js

Used for nestjs projects:

{
  "extends": "@cleeviox/tsconfig/nextjs",
  "include": [".next/types/**/*.ts", "**/*.js", "**/*.ts", "**/*.tsx"],
  "exclude": [".next/**/*.js", "node_modules"]
}

Nest.js

Used for nextjs projects:

{
  "extends": "@cleeviox/tsconfig/nestjs",
  "include": ["**/*.js", "**/*.ts"],
  "exclude": ["build", "node_modules"]
}

Root

If your project is a monorepo, use this configuration for the project root only. Every subsequent workspace then has its own tsconfig.json file, chosen from the above configs based on its purpose.

{
  "extends": "@cleeviox/tsconfig",
  "include": ["./*.js", "./*.ts"],
  "exclude": ["node_modules"]
}

版本与发布记录

@cleeviox/tsconfig 共发布 20 个版本,首次发布于 2026/01/21;过去 12 个月发布了 20 个版本。

版本发布日期距今
0.2.1latest2026/05/275 个月前
0.0.0-next-20260526171102next2026/05/275 个月前
0.0.0-next-202605261708312026/05/275 个月前
0.0.0-next-202605261707442026/05/275 个月前
0.2.02026/04/146 个月前
0.0.0-next-202604140036372026/04/146 个月前

关于 @cleeviox/tsconfig 的常见问题

@cleeviox/tsconfig 是什么?

TypeScript configuration used on CleevioX projects

如何安装 @cleeviox/tsconfig?

在项目目录运行 npm install @cleeviox/tsconfig,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typescript(^6.0.3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cleeviox/tsconfig 支持 TypeScript 吗?

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

@cleeviox/tsconfig 支持 ESM 还是 CommonJS?

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

@cleeviox/tsconfig 可以商用吗?

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

@cleeviox/tsconfig 的下载量有多少?

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

@cleeviox/tsconfig 还在维护吗?

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