Registry / devops / check-prettier

check-prettier

JSON →
library1.0.3jsnpmunverified

A CLI tool to verify that all source files match Prettier code style, designed for CI integration. Current stable version is 1.0.3. The tool reads a 'checkFiles' pattern from package.json and checks formatting, exiting with non-zero if violations are found. It differs from alternatives by requiring Prettier installed separately and using a config key in package.json. Use it in pre-commit hooks or CI pipelines to enforce consistent code formatting. The package is authored by the same developer as other frontend tools and is under active maintenance.

npm install check-prettier
INSTALL
IMPORT
SIG · CHECK-PRETTIER
C
check-prettier
devopsjavascriptv1.0.3
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.

default
npx check-prettier
require('check-prettier') or import checkPrettier from 'check-prettier'
The package is a CLI tool and does not export any symbols for programmatic use. Always invoke via npx or npm script.

Installs dependencies, configures file patterns in package.json, and runs the CLI to check formatting.

npm install --save-dev prettier check-prettier # In package.json, add: # "checkFiles": ["src/**/*.js"] # "scripts": { "lint-prettier": "check-prettier" } # Then run: npx check-prettier
check-prettier --version
Debug
Known issues
gotchaThe package does not work without 'prettier' installed as a separate dependency.
fix
Ensure 'prettier' is in your devDependencies.
affects: all
gotchaFile patterns must be defined in the 'checkFiles' key of package.json, otherwise no files are checked.
fix
Add a 'checkFiles' array to package.json with glob patterns.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'prettier'
Prettier is not installed or not in node_modules.
fix
Run 'npm install --save-dev prettier' to install it.
No files matching pattern
The 'checkFiles' patterns do not match any files in the project.
fix
Update the patterns in package.json to match your source files.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies
prettierrequiredpeer dependency - prettier must be installed separately for formatting checks
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources