prettier-es5

raw JSON →
0.0.4 verified Sat Apr 25 auth: no javascript

A shared Prettier configuration that enforces trailing commas where valid in ES5 (trailingComma: 'es5'), tab width of 4, no semicolons, and single quotes. Current version is 0.0.4. This package is a lightweight config preset requiring no JavaScript logic—just a JSON object. It simplifies consistent Prettier setup across projects by extending the 'prettier' key in package.json. Alternative to eslint-config-prettier or manual .prettierrc files when only these four rules are needed.

error Error: Cannot find module 'prettier-es5'
cause Package not installed or not in node_modules.
fix
Run 'npm install -D prettier-es5' or add to devDependencies.
error Invalid configuration file: [path] - "prettier" should be a string, an object, or a function.
cause Incorrectly placed the 'prettier' key inside another object (e.g., inside scripts).
fix
Ensure 'prettier' is at the top-level of package.json, not nested.
error Prettier config is not loading the shared config: No config found for 'prettier-es5'
cause The 'prettier' key may be set incorrectly, or the config is not resolved.
fix
Double-check the spelling: "prettier": "prettier-es5" (string, not object).
gotcha The config sets no semicolons (semi: false). This may conflict with team style preferences and is not customizable via this preset.
fix Override in local .prettierrc or use a different config.
gotcha Config uses tabWidth: 4, which is non-standard for many projects. May cause inconsistent formatting if other tools expect 2 spaces.
fix Set tabWidth manually in project .prettierrc after referencing this config.
deprecated The package is very low maintenance and has not been updated since original release. Relies on Prettier default behavior; may not reflect latest Prettier options.
fix Consider using official 'prettier' config or create a local .prettierrc.
npm install prettier-es5
yarn add prettier-es5
pnpm add prettier-es5

Shows installation and usage of prettier-es5 as a Prettier config preset via package.json.

// 1. Install
// npm i -D prettier-es5

// 2. Add to package.json
// {
//   "prettier": "prettier-es5"
// }

// 3. Run Prettier
// npx prettier --write .