prettier-config-freee
raw JSON → 2.0.0 verified Sat Apr 25 auth: no javascript
Shared Prettier configuration used by freee. Provides a standard set of formatting rules for consistent code style across projects. Current stable version is 2.0.0. Release cadence is low; versions are updated with breaking changes or rule additions. Key differentiator: opinionated rules tailored to freee's coding standards.
Common errors
error Error: Cannot find module 'prettier-config-freee' ↓
cause Missing dependency: prettier-config-freee is not installed or not in node_modules.
fix
Run npm install prettier-config-freee -D -E or yarn add prettier-config-freee -D -E
error Invalid configuration file: ".prettierrc" - expected a string or object, got array ↓
cause Incorrect format in .prettierrc; should contain a JSON string or object referencing the config.
fix
Set .prettierrc to "prettier-config-freee" (string) or { ... } with extends.
Warnings
breaking v2.0.0 removed trailingComma option ↓
fix If you relied on trailingComma set to 'es5', note it's now the default in Prettier 2.0+. Otherwise, set it explicitly.
deprecated v1.x used trailingComma: 'es5', which is now redundant ↓
fix Upgrade to v2.0.0 or keep v1.x if you need explicit trailingComma.
gotcha Config only works when Prettier is installed and version compatible ↓
fix Ensure prettier is installed as a devDependency. Check that Prettier version is 2.0+ for v2 config.
Install
npm install prettier-config-freee yarn add prettier-config-freee pnpm add prettier-config-freee Imports
- prettier-config-freee wrong
require('prettier-config-freee') or import from pkgcorrect"prettier": "prettier-config-freee" in package.json - prettier-config-freee wrong
npm install -g prettier-config-freeecorrectecho 'prettier-config-freee' > .prettierrc - prettier-config-freee wrong
import config from 'prettier-config-freee' // only works in ESM contextcorrectmodule.exports = require('prettier-config-freee') // in .prettierrc.js
Quickstart
// 1. Install
npm install prettier prettier-config-freee -D -E
// 2. Add to package.json
"prettier": "prettier-config-freee"
// 3. (Alternative) Create .prettierrc:
echo 'prettier-config-freee' > .prettierrc
// 4. Format code
npx prettier --write .