Xcraft Prettier Settings
raw JSON → 2.0.2 verified Sat Apr 25 auth: no javascript
Xcraft Prettier settings is a shared configuration package for Prettier, version 2.0.2, designed for use within the Xcraft ecosystem. It provides a standardized set of Prettier options to enforce consistent code formatting across Xcraft projects. This package is likely internal to Xcraft and not intended for general use; it has low release cadence and minimal documentation. Compared to more widely-adopted shared configs like @company/prettier-config, this is highly specific and may break if Prettier updates its options.
Common errors
error Cannot find module 'xcraft-dev-prettier' ↓
cause Package not installed or not in node_modules.
fix
Run
npm install --save-dev xcraft-dev-prettier. error Invalid configuration file: "xcraft-dev-prettier" is not a valid Prettier configuration. ↓
cause Mistakenly set 'prettier' field in package.json to package name instead of requiring it in a .prettierrc.js file.
fix
Use .prettierrc.js with
module.exports = require('xcraft-dev-prettier'); Warnings
gotcha This package is intended for internal Xcraft use; may not be maintained for general public. ↓
fix Consider using a community-maintained Prettier shared config like @company/prettier-config or prettier-config-standard.
breaking Prettier v3 changes default options (e.g., trailingComma defaults to 'all'), which may conflict with settings in this config. ↓
fix Review Prettier v3 migration guide and update .prettierrc accordingly.
Install
npm install xcraft-dev-prettier yarn add xcraft-dev-prettier pnpm add xcraft-dev-prettier Imports
- prettier wrong
const prettier = require('prettier');correctimport prettier from 'prettier';
Quickstart
// Install the package and Prettier
// npm install --save-dev xcraft-dev-prettier prettier
// In .prettierrc.js:
module.exports = {
...require('xcraft-dev-prettier'),
// Override any settings if needed
};
// Or in package.json:
{
"prettier": "xcraft-dev-prettier"
}