{"id":20317,"library":"prettier-es5","title":"prettier-es5","description":"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.","status":"active","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/StackOverflowIsBetterThanAnyAI/prettier-es5","tags":["javascript","prettier","es5","eslint","prettier-config"],"install":[{"cmd":"npm install prettier-es5","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-es5","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-es5","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a config package meant to be used via the 'prettier' key in package.json. No direct import is needed.","wrong":"import config from 'prettier-es5'","symbol":"default config object","correct":"// Reference via package.json \"prettier\": \"prettier-es5\""},{"note":"CommonJS pattern for a .prettierrc.js file. ESM not supported.","wrong":"export default require('prettier-es5');","symbol":".prettierrc.js export","correct":"module.exports = require('prettier-es5');"},{"note":"In YAML, just the string value. Not an object.","wrong":"prettier: prettier-es5","symbol":".prettierrc.yaml","correct":"prettier-es5"}],"quickstart":{"code":"// 1. Install\n// npm i -D prettier-es5\n\n// 2. Add to package.json\n// {\n//   \"prettier\": \"prettier-es5\"\n// }\n\n// 3. Run Prettier\n// npx prettier --write .","lang":"javascript","description":"Shows installation and usage of prettier-es5 as a Prettier config preset via package.json."},"warnings":[{"fix":"Override in local .prettierrc or use a different config.","message":"The config sets no semicolons (semi: false). This may conflict with team style preferences and is not customizable via this preset.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Set tabWidth manually in project .prettierrc after referencing this config.","message":"Config uses tabWidth: 4, which is non-standard for many projects. May cause inconsistent formatting if other tools expect 2 spaces.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider using official 'prettier' config or create a local .prettierrc.","message":"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.","severity":"deprecated","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install -D prettier-es5' or add to devDependencies.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'prettier-es5'"},{"fix":"Ensure 'prettier' is at the top-level of package.json, not nested.","cause":"Incorrectly placed the 'prettier' key inside another object (e.g., inside scripts).","error":"Invalid configuration file: [path] - \"prettier\" should be a string, an object, or a function."},{"fix":"Double-check the spelling: \"prettier\": \"prettier-es5\" (string, not object).","cause":"The 'prettier' key may be set incorrectly, or the config is not resolved.","error":"Prettier config is not loading the shared config: No config found for 'prettier-es5'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}