RedStone Prettier Config

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

RedStone Prettier Config is a shared Prettier configuration package for all RedStone Finance repositories, currently at version 1.1.0. It provides a centralized Prettier setup to ensure consistent code formatting across projects. The package is used by referencing it in package.json as a Prettier config string, making it simple to adopt without additional configuration. It is maintained as part of the RedStone ecosystem and follows the standard Prettier shared config pattern.

error Cannot find module 'redstone-prettier-config'
cause Package not installed or not in node_modules.
fix
Run npm install --save-dev prettier redstone-prettier-config.
error Configuration for 'prettier' in package.json is not a string or is invalid
cause Wrong format in package.json prettier key.
fix
Ensure the prettier value is a string: "redstone-prettier-config".
gotcha The package is not scoped, so do not use @redstone-finance/ prefix.
fix Use redstone-prettier-config directly.
gotcha Ensure prettier is installed as a dev dependency, not a production dependency.
fix Use --save-dev when installing.
deprecated Using .prettierrc.js with module.exports = 'redstone-prettier-config' is deprecated; you must export the resolved config.
fix Use module.exports = require('redstone-prettier-config');
npm install redstone-prettier-config
yarn add redstone-prettier-config
pnpm add redstone-prettier-config

Shows how to install and use the shared Prettier config in a project, including setting up package.json and running prettier.

// Step 1: Install as dev dependency
npm install --save-dev prettier redstone-prettier-config

// Step 2: Add to package.json
{
  "prettier": "redstone-prettier-config"
}

// Step 3: Run prettier
npx prettier --write .