Prettier Config Planes
raw JSON → 1.0.1 verified Sat Apr 25 auth: no javascript
Shared Prettier configuration package for Team Planes projects. Version 1.0.1 is the current stable release. This package provides a centralized, opinionated Prettier config to ensure consistent code formatting across all projects in the organization. It extends the base Prettier options and can be used by referencing the package name in a project's package.json. The package has no additional dependencies, making it lightweight and easy to adopt. It follows the standard Prettier shared config pattern, allowing for simple integration and overrides.
Common errors
error Cannot find module 'prettier-config-planes' ↓
cause Package not installed or not in node_modules.
fix
Run 'npm install --save-dev prettier-config-planes' to ensure it's installed.
error Invalid configuration file 'prettier.config.js': require() of ES Module not supported ↓
cause Using ES Module syntax to import the config.
fix
Change the config file to CommonJS (module.exports = require(...)) or use package.json prettier field.
Warnings
gotcha Cannot import in a JavaScript file via ES import; must use require or package.json reference. ↓
fix Use require('prettier-config-planes') in a CommonJS config file, or set the 'prettier' key in package.json.
gotcha The config may override project-specific settings; check for unintended changes. ↓
fix Review the config options and use overrides in a local prettier.config.js if needed.
Install
npm install prettier-config-planes yarn add prettier-config-planes pnpm add prettier-config-planes Imports
- prettier-config-planes wrong
// Common mistake: trying to import in JS filecorrect// In package.json: "prettier": "prettier-config-planes" - prettier.config.js wrong
import prettierConfig from 'prettier-config-planes'; // ESM import not supportedcorrectmodule.exports = require('prettier-config-planes');
Quickstart
// 1. Install the package
npm install --save-dev prettier-config-planes
// 2. Add to package.json:
// "prettier": "prettier-config-planes"
// Or create a prettier.config.js:
module.exports = require('prettier-config-planes');
// Then run prettier:
// npx prettier --check .