# @cgzair/cgz-fabric

> A collection of configuration files containing prettier, eslint, stylelint, markdown

Latest version **2.6.0** (published 2026-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cgzair/cgz-fabric
pnpm add @cgzair/cgz-fabric
yarn add @cgzair/cgz-fabric
bun add @cgzair/cgz-fabric
```

Provides the command `fabric`.

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.6.0 |
| Published | 2026-09-22 |
| First published | 2023-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24.14.1 |
| Dependencies | 7 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | cgz |
| Maintainers | luoyelusheng |
| Keywords | cgz-fabric |

## Links

- npm: https://www.npmjs.com/package/@cgzair/cgz-fabric
- npm.io page: https://npm.io/package/@cgzair/cgz-fabric

## Dependencies (7)

- [ejs](https://npm.io/package/ejs.md) ^3.1.6
- [glob](https://npm.io/package/glob.md) ^13.0.0
- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.1
- [commander](https://npm.io/package/commander.md) ^9.0.0
- [@cgzair/cgz-core](https://npm.io/package/@cgzair/cgz-core.md) ^2.6.0

## Recent versions

- 2.6.0 (latest) — 2026-09-22
- 2.5.1 — 2026-09-02
- 2.5.0 — 2026-08-10
- 2.4.0 — 2026-07-28
- 2.3.1 — 2026-07-28
- 2.3.0 — 2026-07-28
- 2.2.6 — 2026-07-28
- 2.2.5 — 2026-07-27
- 2.2.4 — 2026-07-27
- 2.2.3 — 2026-07-27
- 2.2.2 — 2026-07-24
- 2.2.1 — 2026-07-24
- 2.2.0 — 2026-07-23
- 2.1.10 — 2026-07-21
- 2.1.9 — 2026-07-16
- … 16 more at https://npm.io/package/@cgzair/cgz-fabric/versions

## README

# @cgzair/cgz-fabric

fabric 是《信息技术部前端编码手册》的配套 CLI 工具，一键接入符合前端研发部门的编码规范，提高项目研发效率。

## 使用

安装：

```bash
pnpm add @cgzair/cgz-fabric -D
```

![fabric](./lib/config/fabric.gif)

### 自动配置

1.通过 `shell` 命令

```bash
npx fabric install
```

2.通过 `pnpm scripts`

```json
// package.json
{
  "scripts": {
    "prepare": "fabric install"
  }
}
```

## IDE 插件配套集成

推荐使用 `vscode` 作为开发工具，然后安装以下插件：

1. ESLint，安装地址：<https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint>

2. Markdownlint，安装地址：<https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint>

3. Prettier，安装地址：<https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode>

4. Stylelint，安装地址：<https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint>

## 可用选项

帮助

```bash
fabric -h
```

---
_Source: https://npm.io/package/@cgzair/cgz-fabric · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
