
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@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 69 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.

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

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.