Registry / devops / prettier-config-landr

prettier-config-landr

JSON →
library1.3.0jsnpmunverified

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.

npm install prettier-config-landr
INSTALL
IMPORT
SIG · PRETTIER-CONFIG-LA
P
prettier-config-landr
devopsjavascriptv1.3.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
require('prettier-config-landr')
import config from 'prettier-config-landr'
The package exports a plain object via module.exports; it is CJS-only and cannot be default-imported in ESM without a wrapper.
default
const defaultConfig = require('prettier-config-landr');
const defaultConfig = require('prettier-config-landr').default;
There is no .default export; the full config is the module.exports object.
overriding
const defaultConfig = require('prettier-config-landr'); module.exports = { ...defaultConfig, overrides: [ ...defaultConfig.overrides, { files: '*.scss', options: { tabWidth: 2 } } ] };
module.exports = require('prettier-config-landr').overrides;
To override, spread the whole defaultConfig into your own config object. Accessing only .overrides will lose all base options.

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
Debug
Known issues
gotchaThe 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.
affects: >=1.0.0
gotchaDo not use import { default } from 'prettier-config-landr'; it will be undefined.
fix
Use const config = require('prettier-config-landr');
affects: >=1.0.0
breakingVersion 1.0.1 updated dependencies, potentially changing formatting rules indirectly.
fix
Review changelog for dependency version bumps that may alter behavior.
affects: 1.0.1
gotchaOverriding settings incorrectly by only spreading .overrides will miss base options like printWidth, singleQuote, etc.
fix
Always spread the entire defaultConfig, then override specific keys.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'prettier-config-landr'
Package not installed or missing from node_modules.
fix
Run npm install prettier prettier-config-landr --save-dev
Invalid configuration for 'prettier-config-landr'
Attempted to import the config as an ES module.
fix
Use require() instead of import.
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
prettierrequiredPeer dependency: required to run prettier
Agent activity
4 hits · last 30 days
node
4
Resources
prettier-config-landr — npm install prettier-config-landr · libregistry