Registry / devops / prettier-config-moon

prettier-config-moon

JSON →
library1.2.2jsnpmunverified

A strict, accessibility-focused Prettier shared configuration from the moonrepo team. Current stable version is 1.2.2, released regularly alongside other moonrepo presets. Key differentiators: enforces tabs over spaces for accessibility, includes arrow parenthesis always, trailing commas, semicolons, single quotes, and spaces for indentation. Minimal dependencies; export is a string reference, not a JavaScript object. Designed for projects using Prettier with Node.js and the moon monorepo toolchain.

npm install prettier-config-moon
INSTALL
IMPORT
SIG · PRETTIER-CONFIG-MO
P
prettier-config-moon
devopsjavascriptv1.2.2
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
module.exports = 'prettier-config-moon';
module.exports = require('prettier-config-moon');
The config is a string reference, not a JavaScript object. Common mistake is to require or import it as an object.
prettier/prettier.config
module.exports = 'prettier-config-moon';
In a .prettierrc.js or prettier.config.js file, export the package name as a string.
.prettierrc
"prettier-config-moon"
{"extends": "prettier-config-moon"}
In JSON .prettierrc, use a plain string, not an 'extends' key. The extends key is not supported by Prettier.

Shows how to extend the shared Prettier config by exporting the package name as a string in a prettier.config.js file.

// prettier.config.js module.exports = 'prettier-config-moon';
Debug
Known issues
gotchaConfig is a string, not an object. Do not require or import it as a JavaScript object.
fix
Export the package name as a string: module.exports = 'prettier-config-moon';
affects: >=1.0.0
gotchaUsing tabs for indentation may conflict with projects that expect spaces.
fix
Override the tabWidth and useTabs options in your local config if needed.
affects: all
deprecatedVersion 1.x is stable; no breaking changes reported, but always check peer dependency versions.
fix
Ensure prettier peer dependency is compatible. No specific fix needed.
affects: >=1.2.0
Errors
Common errors & fixes
Cannot find module 'prettier-config-moon'
Package not installed or not resolvable from the configuration file location.
fix
Install the package as a dev dependency: npm install --save-dev prettier-config-moon
Invalid configuration file: Expected string, got object
Trying to require the package and assign its exports to module.exports instead of using the package name string.
fix
Change to: module.exports = 'prettier-config-moon';
Error: Could not resolve 'prettier-config-moon' from ...
Configuration file path is not in a location where Prettier can resolve the module name.
fix
Place the configuration file (e.g., prettier.config.js) in the project root directory.
Upgrade
Version history
1.2.2latest on npm
Audit
Dependencies
prettierrequiredPeer dependency required to apply formatting
Agent activity
6 hits · last 30 days
node
6
Resources
prettier-config-moon — npm install prettier-config-moon · libregistry