prettier-config-rive
raw JSON → 1.0.0 verified Sat Apr 25 auth: no javascript
Prettier shareable configuration for RiVE projects. Version 1.0.0 requires Prettier ^3.0.0 and includes prettier-plugin-packagejson. It enforces consistent code formatting across RiVE projects, with no other peer dependencies. Released as a single stable version. Differentiators: opinionated standard config for the RiVE ecosystem, minimal setup.
Common errors
error Error: Cannot find module 'prettier-config-rive' ↓
cause Package not installed or not found in node_modules
fix
Run npm install --save-dev prettier-config-rive
error Error: Invalid configuration for 'prettier' in package.json: expected a string or object ↓
cause Misconfigured prettier field in package.json
fix
Set "prettier": "prettier-config-rive" or reference an object, not a function
error Error: prettier-plugin-packagejson not found ↓
cause Plugin not installed but config expects it
fix
Run npm install --save-dev prettier-plugin-packagejson
Warnings
breaking Requires Prettier ^3.0.0; incompatible with Prettier v2 ↓
fix Upgrade Prettier to v3 or later, or use an older config version if available.
gotcha prettier-plugin-packagejson is included but must be installed separately if not already present ↓
fix Run npm install --save-dev prettier-plugin-packagejson
gotcha Config is an object, not a function; do not call it or destructure named exports ↓
fix Use require('prettier-config-rive') or import config from 'prettier-config-rive'
Install
npm install prettier-config-rive yarn add prettier-config-rive pnpm add prettier-config-rive Imports
- default config wrong
const config = require('prettier-config-rive')correctimport config from 'prettier-config-rive' - use in .prettierrc wrong
"prettier": "@rive/prettier-config"correct"prettier": "prettier-config-rive" - extend in prettier.config.js wrong
import { rive } from 'prettier-config-rive'correctmodule.exports = { ...require('prettier-config-rive'), semi: false }
Quickstart
// Install dependencies
npm install --save-dev prettier prettier-config-rive
// In package.json, add:
"prettier": "prettier-config-rive"
// Or in .prettierrc.json:
"prettier-config-rive"
// Then run:
npx prettier --check .