@adonisjs/prettier-config

中文文档
1.5.0发布于 2026/05/28MITESM + CJS构建来源已验证近 30 天下载 33.3万

Prettier config preset for AdonisJS packages and applications

原始使用文档
文档目录3 节
  1. Base Prettier configuration
  2. Installation
  3. Usage

@adonisjs/prettier-config



Base Prettier configuration

Base prettier rules used by the AdonisJS team for packages and the applications.


npm-image license-image

Installation

Install the package from the npm registry.

npm i -D @adonisjs/prettier-config

# Make sure also to install the following packages
npm i -D prettier

Usage

After installation, you can copy/paste the following block of code within the package.json file.

{
  "prettier": "@adonisjs/prettier-config"
}

Our base config also installs and configures the prettier-plugin-edgejs package to format Edge templates using Prettier.

Built with ❤︎ by Julien Ripouteau and Harminder Virk

版本与发布记录

@adonisjs/prettier-config 共发布 21 个版本,首次发布于 2023/06/16;过去 12 个月发布了 1 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.5.0latest2026/05/285 个月前
1.4.52025/05/241.5 年前
1.3.12025/05/241.5 年前
1.4.42025/03/081.7 年前
1.4.32025/03/081.7 年前
1.4.22025/03/071.7 年前

关于 @adonisjs/prettier-config 的常见问题

@adonisjs/prettier-config 是什么?

Prettier config preset for AdonisJS packages and applications

如何安装 @adonisjs/prettier-config?

在项目目录运行 npm install @adonisjs/prettier-config,或使用 pnpm add / yarn add / bun add。

@adonisjs/prettier-config 支持 TypeScript 吗?

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

@adonisjs/prettier-config 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@adonisjs/prettier-config 可以商用吗?

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

@adonisjs/prettier-config 的下载量有多少?

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

@adonisjs/prettier-config 还在维护吗?

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