macOS
brew install prettierlocal Homebrew formula metadata
安装
brew install prettierlocal Homebrew formula metadata
sudo apk add prettierAlpine Linux edge package indexes · prettier · 来源: dl-cdn.alpinelinux.org
nix profile install nixpkgs#prettiernixpkgs package indexes · pkgs/by-name/pr/prettier/package.nix · 来源: api.github.com
sudo pacman -S prettierArch Linux sync databases · prettier · 来源: geo.mirror.pkgbuild.com
概览
Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML
历史
Prettier is an opinionated formatter that parses source code and prints a consistent representation. It supports JavaScript and numerous adjacent web, configuration, and prose formats.
James Long created Prettier as an opinionated JavaScript formatter, and the project was publicly introduced in early 2017. Prettier 1.0 followed in April 2017 after rapid early adoption.
The project expanded beyond JavaScript during 2017 and 2018, adding TypeScript, CSS, GraphQL, JSON, Markdown, EditorConfig, YAML, HTML, Vue, Angular, MDX, and an extensible plugin ecosystem. Prettier 3.0 moved the codebase to ECMAScript modules and overhauled its public and plugin APIs.
Prettier spread through local development dependencies, editor integrations, Git hooks, and continuous-integration checks. Its official documentation recommends pinning an exact project-local installation and documents integrations with editors, linters, and staged-file tooling.
Typical workflows run `prettier . --write` to rewrite files and `prettier . --check` in CI. Prettier resolves configuration from the formatted file upward through the directory tree and intentionally provides no global configuration.
Prettier helped establish opinionated, deterministic formatting as a standard component of JavaScript and web-development toolchains. Its parser-and-printer model, deliberately small option surface, multi-language support, and plugin interface shifted formatting away from large collections of stylistic lint rules.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
package.jsonpackage.yaml.prettierrc.prettierrc.json.prettierrc.yml.prettierrc.yaml.prettierrc.json5.prettierrc.jsprettier.config.js.prettierrc.tsprettier.config.ts.prettierrc.mjsprettier.config.mjs.prettierrc.mtsprettier.config.mts.prettierrc.cjsprettier.config.cjs.prettierrc.ctsprettier.config.cts.prettierrc.toml.editorconfig可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
prettier | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:prettier |
|---|---|
| 版本 | 3.9.10 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/prettier |
| 主页 | https://prettier.io/ |
| 仓库 | https://github.com/prettier/prettier |
| 上游文档 | https://prettier.io/ |
| 许可证 | MIT |
| 源码归档 | https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz |
| 最后更新 | 2026-10-11T11:49:55Z |
| Pulse | updated |
| 依赖 | node |
| Bottle | 可用 (于 all) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | prettier |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
prettier
nix profile install nixpkgs#prettierprettier 3.8.4-r0
Opinionated code formatter
sudo apk add prettierprettier-doc 3.8.4-r0
Opinionated code formatter (documentation)
sudo apk add prettier-docprettier 3.8.1-1
An opinionated code formatter
sudo pacman -S prettier来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.