geta-prettier-config

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

Shared Prettier configuration used by Geta projects. This package provides a single default configuration object for Prettier, designed to be extended via package.json or a Prettier config file. Version 1.0.0 is the initial stable release with no updates since. It is a simple, opinionated config targeting consistent code style across Geta projects. Differentiator: a lightweight shareable config without peer dependencies, relying on the consumer to install Prettier.

error Error: Cannot find module 'geta-prettier-config'
cause Package not installed or not in node_modules.
fix
Run: npm install --save-dev geta-prettier-config
error prettier: Invalid configuration file: module.exports = require('geta-prettier-config'); TypeError: geta-prettier-config is not a function
cause Attempted to call the config as a function instead of using require.
fix
Remove parentheses: module.exports = require('geta-prettier-config');
gotcha The configuration is static; no override support via this package. Overrides must be applied in consumer's config file by spreading or merging.
fix In prettier.config.js: module.exports = { ...require('geta-prettier-config'), semi: false };
npm install geta-prettier-config
yarn add geta-prettier-config
pnpm add geta-prettier-config

Install and use the shared Prettier config by adding a string reference to package.json or using require in a config file.

// 1. Install the package and prettier
// npm install --save-dev prettier geta-prettier-config

// 2. In package.json, add:
// "prettier": "geta-prettier-config"

// 3. Or create a prettier.config.js:
module.exports = require('geta-prettier-config');

// 4. Format all files:
// npx prettier --check .
// npx prettier --write .