Registry / devops / prettier-pretty-check

prettier-pretty-check

JSON →
library0.2.0jsnpmunverified

A drop-in replacement for Prettier's CLI that enhances the --check output with clickable file links, color-coded error categories, and clear rule descriptions. Version 0.2.0 is the current stable release. Unlike Prettier's default terse warnings, this tool emits diagnostics in standard file:line:col format compatible with VS Code, GitHub Actions problem matchers, and most editors. It supports all Prettier options and plugins, passing through non-check commands unchanged. Requires Node.js 18+ and Prettier to be installed separately.

npm install prettier-pretty-check
INSTALL
IMPORT
SIG · PRETTIER-PRETTY-CH
P
prettier-pretty-check
devopsjavascriptv0.2.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

prettier-pretty-check
npx prettier-pretty-check --check src/
npm run prettier-pretty-check --check src/
The package is a CLI tool, not a library. Use npx or add to package.json scripts. Not meant for programmatic require/import.

Install prettier and prettier-pretty-check, then run the enhanced check command via npx or a npm script.

npm install --save-dev prettier prettier-pretty-check # or bun add --dev prettier prettier-pretty-check # Add to package.json: # { # "scripts": { # "format:check": "prettier-pretty-check --check \"src/**/*.{js,ts}\"" # } # } # Run: npx prettier-pretty-check --check "src/**/*.js"
prettier-pretty-check --version
Debug
Known issues
gotchaprettier-pretty-check does not bundle prettier; you must install prettier separately.
fix
Run npm install --save-dev prettier alongside prettier-pretty-check.
affects: >=0.0.0
gotchaWhen --write is used, arguments are passed through to prettier unchanged; no enhanced output is produced.
fix
Use --write as with normal prettier; enhanced output only appears with --check.
affects: >=0.0.0
deprecatedVersion 0.2.0 still works but may lack features for newer prettier versions.
fix
Watch the repository for updates; for now the tool works with prettier v2 and v3.
affects: <=0.2.0
Errors
Common errors & fixes
Error: Cannot find module 'prettier'
Prettier is not installed in the project.
fix
Install prettier: npm install --save-dev prettier
Error: Unknown argument: --foo
Using an argument that prettier does not support; passed through to prettier and rejected.
fix
Check prettier's documentation for valid options.
Error: The 'path' argument must be of type string. Received undefined
Running prettier-pretty-check without any file pattern.
fix
Specify a glob pattern like npx prettier-pretty-check --check "src/**/*.js"
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
prettierrequiredRuntime peer dependency – the actual formatting engine. Must be installed in the project.
Agent activity
12 hits · last 30 days
node
12
Resources
prettier-pretty-check — npm install prettier-pretty-check · libregistry