Oberon Prettier Config

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

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.

error Cannot find module 'oberon-prettier-config'
cause Trying to require or import the package in a config file that expects a JavaScript object.
fix
Use the string reference in package.json or export the string from prettier.config.js.
error Configuration for 'prettier' not found
cause Prettier version mismatch or wrong config path.
fix
Prettier 2.0+ uses the "prettier" field in package.json or .prettierrc. Ensure oberon-prettier-config is installed.
gotcha The config must be referenced as a string, not a JavaScript import.
fix Set "prettier": "oberon-prettier-config" in package.json.
gotcha Prettier peer dependency may not be installed automatically with older npm versions.
fix Ensure prettier is installed separately: npm install -D prettier.
npm install oberon-prettier-config
yarn add oberon-prettier-config
pnpm add oberon-prettier-config

Install Prettier and the shared config, then set the prettier field in package.json.

npm install -D prettier oberon-prettier-config
# Add to package.json:
# "prettier": "oberon-prettier-config"