Prettier Config Escapace
raw JSON → 1.2.2 verified Sat Apr 25 auth: no javascript
A shareable Prettier configuration from the escapace ecosystem. Version 1.2.2 provides a curated set of Prettier options for consistent code formatting. This package exports a simple configuration object that can be extended in a project's package.json or .prettierrc. It is updated as Prettier evolves, with recent bug fixes for htmlWhitespaceSensitivity. Different from manual configuration, it offers a single source of truth for formatting rules, reducing setup overhead and ensuring team alignment. Suitable for any JavaScript/TypeScript project using Prettier.
Common errors
error Cannot find module 'prettier-config-escapace' ↓
cause Package not installed or not in node_modules.
fix
Run
npm install prettier-config-escapace or pnpm add prettier-config-escapace. Warnings
gotcha ESM-only package: Must use import, not require(). Node.js <14 are unsupported. ↓
fix Use ES modules or upgrade Node.js to v14+ and set "type": "module" in package.json.
gotcha Config may override project-specific settings: Prettier merges configs, but the escapace config sets certain options as defaults. ↓
fix Extend the config via 'extends' in your own Prettier config and override specific options.
gotcha Version mismatch: Prettier version may affect compatibility with this config. ↓
fix Ensure Prettier is within the supported range; check the package's peerDependencies.
Install
npm install prettier-config-escapace yarn add prettier-config-escapace pnpm add prettier-config-escapace Imports
- prettier-config-escapace wrong
const config = require('prettier-config-escapace');correctimport config from 'prettier-config-escapace'; - prettierConfigEscapace (named export, if any) wrong
import { default as config } from 'prettier-config-escapace';correctimport { prettierConfig } from 'prettier-config-escapace'; - type imports for TypeScript extensions wrong
import { Config } from 'prettier-config-escapace';correctimport type { Config } from 'prettier-config-escapace';
Quickstart
// package.json
{
"prettier": "prettier-config-escapace"
}
// or .prettierrc.json
"prettier-config-escapace"
// or use in JavaScript
import config from 'prettier-config-escapace';
// Then pass config to Prettier programmatically