prettier-config

raw JSON →
1.0.0 verified Sat Apr 25 auth: no javascript abandoned

Read Prettier options from a `.prettieropts` file and pass them to the `prettier` binary. Version 1.0.0. Very minimal package, appears to be experimental or forked from a gist, no regular release cadence. Depends on `prettier` being installed. Simpler than `@prettier/plugin-x` but limited to npm scripts.

error prettier-config: command not found
cause Package not installed or npx not available.
fix
Install prettier-config locally: npm install --save-dev prettier-config
error Cannot find module 'prettier'
cause Prettier not installed as a dependency.
fix
Install prettier: npm install --save-dev prettier
gotcha Only works when used inside a script inside package.json due to reliance on npx for prettier binary.
fix Use via npm scripts or run with npx.
deprecated Package is a gist copy, unmaintained since 2019. No releases beyond 1.0.0.
fix Consider using official prettier with --config option or eslint-config-prettier.
npm install prettier-config
yarn add prettier-config
pnpm add prettier-config

Configure npm scripts to use prettier-config to format JavaScript files with options from .prettieropts.

{
  "scripts": {
    "format": "prettier-config \"src/**/*.js\"",
    "check": "prettier-config --list-different \"src/**/*.js\""
  }
}