{"id":20568,"library":"standard-prettier","title":"prettier-standard-formatter","description":"Prettier configured with JavaScript Standard Style rules for zero-config code formatting. Current version 1.0.1 (last released 2019). Combines prettier's formatting with standard style (no semicolons, single quotes, etc.). Useful for projects already using standard but wanting prettier's advanced formatting. Note: CLI version uses local installation if available.","status":"deprecated","version":"1.0.1","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/dtinth/prettier-standard-formatter","tags":["javascript"],"install":[{"cmd":"npm install standard-prettier","lang":"bash","label":"npm"},{"cmd":"yarn add standard-prettier","lang":"bash","label":"yarn"},{"cmd":"pnpm add standard-prettier","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core formatting engine","package":"prettier","optional":false},{"reason":"Provides standard style rules","package":"standard","optional":false}],"imports":[{"note":"Use named import to access format function. CJS require also works but returns a module with format method.","wrong":"const prettierStandard = require('prettier-standard')","symbol":"format","correct":"import { format } from 'prettier-standard'"},{"note":"CJS is default export pattern. ESM default import may require addons.","wrong":"import prettierStandard from 'prettier-standard'","symbol":"prettierStandard","correct":"const prettierStandard = require('prettier-standard')"},{"note":"format is a named export, not default.","wrong":"import format from 'prettier-standard'","symbol":"format","correct":"import { format } from 'prettier-standard'"}],"quickstart":{"code":"import { format } from 'prettier-standard'\n\nconst code = `const x = 'hello'  `\nformat(code).then(result => {\n  console.log(result)\n  // Output: const x = 'hello'\n})","lang":"typescript","description":"Basic usage of format function to format a string according to JavaScript Standard Style."},"warnings":[{"fix":"Consider using prettier with a standard config like eslint-config-standard or prettier-config-standard.","message":"Package has not been updated since 2019 and may not work with newer prettier versions.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always await or .then() the format call.","message":"The format function returns a Promise in the API but CLI uses synchronous-like usage.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure correct package installation path for CLI.","message":"CLI behavior differs from API: CLI uses local installation if available, else global.","severity":"breaking","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install prettier","cause":"Peer dependency prettier not installed.","error":"Error: Cannot find module 'prettier'"},{"fix":"Use const prettierStandard = require('prettier-standard'); then prettierStandard.format(source).then(...)","cause":"Using require wrongly (missing .format).","error":"TypeError: prettierStandard.format is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}