prettier-config-landr

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

LANDR's shareable Prettier configuration. Version 1.3.0 is the current release. It requires Prettier >=3.3 as a peer dependency. The package is used to enforce consistent code formatting across LANDR projects. It supports CommonJS require and can be extended or overridden via spread in .prettierrc.js. Configuration is exported as a plain object. The package follows a semver release cadence with occasional breaking changes when upgrading dependencies. It is not a standalone formatter but a config extension for Prettier.

error Cannot find module 'prettier-config-landr'
cause Package not installed or missing from node_modules.
fix
Run npm install prettier prettier-config-landr --save-dev
error Invalid configuration for 'prettier-config-landr'
cause Attempted to import the config as an ES module.
fix
Use require() instead of import.
gotcha The config is exported as a plain object via module.exports. It cannot be imported using ES import syntax directly.
fix Use require() or configure a CJS-compatible import.
gotcha Do not use import { default } from 'prettier-config-landr'; it will be undefined.
fix Use const config = require('prettier-config-landr');
breaking Version 1.0.1 updated dependencies, potentially changing formatting rules indirectly.
fix Review changelog for dependency version bumps that may alter behavior.
gotcha Overriding settings incorrectly by only spreading .overrides will miss base options like printWidth, singleQuote, etc.
fix Always spread the entire defaultConfig, then override specific keys.
npm install prettier-config-landr
yarn add prettier-config-landr
pnpm add prettier-config-landr

Shows how to install the package and set it as the entire Prettier config.

// .prettierrc.js
module.exports = require('prettier-config-landr');

// Install:
// npm install prettier prettier-config-landr --save-dev