This package provides pplancq prettier as an extensible shared config.
We export three Prettier configurations for your usage.
npm install --save-dev @pplancq/prettier-configUse with command to enable the default configuration.
npx init-prettier-configThis is the default configuration. To use, add "prettier": "@pplancq/prettier-config" to your package.json.
As of version 2.x, this package is ESM-only. CommonJS (require) is no longer supported.
Old (CommonJS) usage:
// .prettierrc.js or prettier.config.js
module.exports = require("@pplancq/prettier-config");New (ESM) usage:
// prettier.config.mjs (or prettier.config.js when using "type": "module")
import defaultConfig from "@pplancq/prettier-config";
export default {
...defaultConfig,
};If you are using a .js config file, ensure your environment supports ESM (e.g., Node.js >= 18, or set "type": "module" in your package.json).
Version 4 aligns the shared config with Prettier's default recommendations. The following options are no longer overridden:
singleQuote: previously set totrue, now uses Prettier's default (false).arrowParens: previously set to"avoid", now uses Prettier's default ("always").
As a result, strings will be formatted with double quotes and arrow functions with a single argument will include parentheses.
After upgrading, run Prettier on your codebase to apply the new formatting:
npx prettier --write .