Registry / devops / prettier-config-che

prettier-config-che

JSON →
library3.0.17jsnpmunverified

A shared Prettier configuration for CHE Proximity projects. Current stable version: 3.0.17. The package provides a consistent code formatting standard across CHE Proximity projects. It includes a CLI tool that generates a .prettierrc.json file and installs Prettier if not already present. Release cadence is irregular, tied to updates in Prettier or ESLint peer dependencies. Key differentiator: opinionated, CHE-specific formatting rules with automated setup.

npm install prettier-config-che
INSTALL
IMPORT
SIG · PRETTIER-CONFIG-CH
P
prettier-config-che
devopsjavascriptv3.0.17
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default
import config from 'prettier-config-che'
const config = require('prettier-config-che')
ESM usage; can also extend in .prettierrc.js: module.exports = 'prettier-config-che'
PrettierConfig
import type { PrettierConfig } from 'prettier-config-che'
TypeScript usage requires prettier >= 3.0.1 and the package exports types
postinstall
npx postinstall
npm run postinstall
The postinstall script is a tool to install prettier as devDependency, not a npm lifecycle script

Shows how to install the config, set up Prettier, generate configuration, and format all project files.

// Install the config as a dev dependency npm install prettier-config-che --save-dev // Run the postinstall script to install Prettier (if not already installed) npx postinstall // Generate .prettierrc.json npx prettier-config-che // Format all files npx prettier . --write
Debug
Known issues
breakingv3 requires prettier >= 3.0.1; older versions may cause configuration parsing errors
fix
Update prettier to 3.0.1 or later using npm install prettier@latest --save-dev
affects: >=3.0.0
gotchaThe postinstall script installs prettier as a devDependency; if prettier is already present globally, it may still install locally
fix
Run 'npx postinstall' only if prettier is not already in package.json devDependencies
affects: *
gotchanpx prettier-config-che overwrites any existing .prettierrc.json without prompt
fix
Back up existing config before running the command
affects: *
deprecatedThe postinstall script is deprecated in favor of manual prettier installation; future versions may remove it
fix
Install prettier manually via 'npm install prettier --save-dev --save-exact'
affects: >=3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'prettier-config-che'
Package not installed or not in devDependencies
fix
Run npm install prettier-config-che --save-dev
Error: Configuration file .prettierrc.json not found
Not yet generated by npx prettier-config-che
fix
Run npx prettier-config-che to generate the config file
Error: [prettier] Invalid configuration encountered
Incompatible prettier version (less than 3.0.1)
fix
Update prettier to 3.0.1 or later
Upgrade
Version history
3.0.17latest on npm
Audit
Dependencies
prettierrequiredPeer dependency required for formatting; version 3.0.1
eslintoptionalPeer dependency optionally used for linting integration; version ^8.52.0
Agent activity
4 hits · last 30 days
node
4
Resources
prettier-config-che — npm install prettier-config-che · libregistry