
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@contractkit/prettier-plugin
Advanced tools
A Prettier plugin that formats ContractKit .ck files. Idempotent: re-formatting an already-formatted file is a no-op.
pnpm add -D prettier @contractkit/prettier-plugin
Add the plugin to your prettier config:
{
"plugins": ["@contractkit/prettier-plugin"]
}
Prettier registers .ck as the ContractDSL language and applies the plugin automatically.
# Format all .ck files in your project
pnpm prettier --write "**/*.ck"
# Or via the editor integration of your choice
Most editors with a Prettier integration (VS Code, JetBrains, Neovim) pick the plugin up from your project's package.json automatically.
The printer round-trips the parser's AST back into canonical .ck source:
tabWidth)override → deprecated → readonly|writeonlyoptions block items, route bodies, and operation blocks# comment placement preserved on field/operation/status linescontract C: A & B & { ... } with the inline block always last| is preserved on type aliases like contract X: A | B | Cdiscriminated(by=field, A | B | C)options { request/response: { headers } }) are emitted in their original un-merged form so the AST round-trips cleanlyThe plugin honours Prettier's printWidth for line-wrapping decisions where applicable, but most CK constructs format to a fixed multi-line shape regardless of width.
| Path | Purpose |
|---|---|
src/index.ts | Prettier plugin entry — parser + printer registration |
src/print-ck.ts | Top-level dispatcher; renders the options { ... } block |
src/print-contract.ts | Renders contract declarations and field blocks |
src/print-operation.ts | Renders operation declarations, params, query, headers, request/response |
src/print-type.ts | Shared type-expression printer used everywhere a type appears |
src/indent.ts | Indentation constants and helpers |
FAQs
Prettier plugin for ContractKit DSL
The npm package @contractkit/prettier-plugin receives a total of 36 weekly downloads. As such, @contractkit/prettier-plugin popularity was classified as not popular.
We found that @contractkit/prettier-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.