prettier-standard-formatter

raw JSON →
0.222222222222222.333333333333333 verified Sat Apr 25 auth: no javascript deprecated

Prettier for JavaScript Standard Style. Version 0.222222222222222.333333333333333. Combines prettier pretty-printer with JavaScript Standard Style rules for zero-config formatting. Not actively maintained; alternatives include prettier-standard or prettier with standard config. Release cadence: sporadic. Key differentiator: auto-applies Standard Style without manual configuration, but version numbers are non-standard (likely a placeholder).

error Error: Cannot find module 'prettier-standard'
cause Incorrect import path in documentation vs actual package name.
fix
Install the correct package: npm install prettier-standard-formatter (note the -formatter suffix).
error TypeError: prettierStandard.format is not a function
cause Importing default as a named export or using wrong method.
fix
Import as: const prettierStandard = require('prettier-standard-formatter'); then call prettierStandard.format(source).
error SyntaxError: Unexpected token import
cause Using ES modules in Node.js without proper configuration.
fix
Use CommonJS require() or enable ESM (e.g., type: module in package.json).
deprecated Package is deprecated in favor of prettier-standard or prettier with standard config.
fix Use prettier-standard or configure prettier with eslint-config-standard.
gotcha Version number is non-standard (0.222...). Likely a placeholder or typo; do not rely on semver.
fix Check actual latest version from npm registry.
gotcha CLI command name may conflict with other packages (prettier-standard-formatter vs prettier-standard).
fix Use npx to avoid ambiguity: npx prettier-standard-formatter
npm install prettier-standard-formatter
yarn add prettier-standard-formatter
pnpm add prettier-standard-formatter

Shows basic usage of formatting a string with prettier-standard-formatter using the default export.

const prettierStandard = require('prettier-standard-formatter');
const sourceCode = 'const x = 1;  const y = 2;';
prettierStandard.format(sourceCode).then(formatted => {
  console.log(formatted);
  // Output: const x = 1
// const y = 2
});