{"id":20250,"library":"oberon-prettier-config","title":"Oberon Prettier Config","description":"Oberon's standard Prettier configuration, version 1.0.0. It is a simple, shared configuration for Prettier that enforces a consistent code style across projects. The package is stable and follows Semantic Versioning. It is intended to be used as an extendable config in package.json, offering an opinionated but minimal setup. Unlike other shareable configs like @company/prettier-config, it focuses on simplicity and integration with Oberon's ecosystem.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/oberon/oberon-prettier-config","tags":["javascript"],"install":[{"cmd":"npm install oberon-prettier-config","lang":"bash","label":"npm"},{"cmd":"yarn add oberon-prettier-config","lang":"bash","label":"yarn"},{"cmd":"pnpm add oberon-prettier-config","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required as the config is meant for Prettier.","package":"prettier","optional":false}],"imports":[{"note":"This package is not a JavaScript module; it is used as a string reference in package.json.","wrong":"import config from 'oberon-prettier-config'","symbol":"default config","correct":"\"prettier\": \"oberon-prettier-config\" in package.json"},{"note":"The correct pattern is to export the string directly, not require the package.","wrong":"module.exports = require('oberon-prettier-config');","symbol":"prettier.config.js","correct":"module.exports = \"oberon-prettier-config\";"},{"note":"Although not recommended, if you must load the config programmatically, use require() in CommonJS. ESM import is not supported.","wrong":"import config from 'oberon-prettier-config';","symbol":"Prettier config object","correct":"const config = require('oberon-prettier-config');"}],"quickstart":{"code":"npm install -D prettier oberon-prettier-config\n# Add to package.json:\n# \"prettier\": \"oberon-prettier-config\"","lang":"bash","description":"Install Prettier and the shared config, then set the prettier field in package.json."},"warnings":[{"fix":"Set \"prettier\": \"oberon-prettier-config\" in package.json.","message":"The config must be referenced as a string, not a JavaScript import.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure prettier is installed separately: npm install -D prettier.","message":"Prettier peer dependency may not be installed automatically with older npm versions.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use the string reference in package.json or export the string from prettier.config.js.","cause":"Trying to require or import the package in a config file that expects a JavaScript object.","error":"Cannot find module 'oberon-prettier-config'"},{"fix":"Prettier 2.0+ uses the \"prettier\" field in package.json or .prettierrc. Ensure oberon-prettier-config is installed.","cause":"Prettier version mismatch or wrong config path.","error":"Configuration for 'prettier' not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}