@adonisjs/prettier-config
Base Prettier configuration
Base prettier rules used by the AdonisJS team for packages and the applications.
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.
关于 @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 和提交记录判断。