{"id":21707,"library":"prettier-config-standard","title":"prettier-config-standard","description":"A shareable Prettier configuration that enforces JavaScript Standard Style formatting rules. Version 7.0.0 is the latest stable release, compatible with Prettier ^2.6.0 or ^3.0.0. It explicitly sets Prettier options to match the Standard style, including arrowParens, bracketSameLine, singleAttributePerLine, endOfLine, and JSX quote handling. Unlike directly using Standard, this config works with Prettier as a standalone formatter without ESLint. Updated with each Prettier major release to track option changes and peer dependency ranges.","status":"active","version":"7.0.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/npetruzzelli/prettier-config-standard","tags":["javascript","eslint","eslintconfig","eslint-config","eslintplugin","eslint-plugin","JavaScript Standard Style","jsstandard","lint"],"install":[{"cmd":"npm install prettier-config-standard","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-config-standard","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-config-standard","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to use the config","package":"prettier","optional":false}],"imports":[{"note":"For `.prettierrc.js` or `prettier.config.js`. The package exports a string, not an object.","wrong":"module.exports = require('prettier-config-standard')","symbol":"default (string)","correct":"module.exports = 'prettier-config-standard'"},{"note":"In `package.json`, set the `prettier` key to the string directly.","wrong":"\"prettier\": { \"extends\": \"prettier-config-standard\" }","symbol":"default (string)","correct":"\"prettier\": \"prettier-config-standard\""},{"note":"CommonJS require is used for extending because the module is not ESM.","wrong":"import prettierConfigStandard from 'prettier-config-standard'","symbol":"require for extending","correct":"const prettierConfigStandard = require('prettier-config-standard')"}],"quickstart":{"code":"// Install\nnpm install --save-dev prettier prettier-config-standard\n\n// .prettierrc.js\nmodule.exports = 'prettier-config-standard';\n\n// Or package.json\n{\n  \"name\": \"my-project\",\n  \"prettier\": \"prettier-config-standard\",\n  \"devDependencies\": {\n    \"prettier\": \"^3.0.0\",\n    \"prettier-config-standard\": \"^7.0.0\"\n  }\n}\n\n// Format a file\nnpx prettier --write src/index.js","lang":"javascript","description":"Installs the shared config and uses it via .prettierrc.js or package.json, then formats a file."},"warnings":[{"fix":"Update code to include parentheses on all arrow function parameters, or pin to v3.x if needed.","message":"In v4.0.0, arrowParens changed from 'avoid' to 'always'. Code that relied on omitting parentheses around single-parameter arrow functions will now have parentheses added.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade Prettier to ^2.4.0 or later. If you must use older Prettier, stay on v4.x.","message":"In v5.0.0, jsxBracketSameLine was replaced with bracketSameLine. Prettier < 2.4.0 is no longer supported. If using Prettier < 2.4.0, this config will cause errors.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Ensure your editor and git config handle LF line endings. Optionally override endOfLine in your own Prettier config.","message":"In v3.0.0, endOfLine changed from 'auto' to 'lf'. Windows users may see line ending changes when formatting. Re-cloning the repository may be needed after running Prettier.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use Prettier ^3.0.0 if possible; otherwise ensure your Prettier version satisfies '^2.6.0 || ^3.0.0'.","message":"Version 6.0.0 added support for Prettier 3.x. Prettier 2.x is still supported but may eventually drop.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Ensure you also install Prettier separately: npm install --save-dev prettier","message":"This config does not install Prettier, Standard, or ESLint. Users often assume it will install Prettier as a dependency.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run: npm install --save-dev prettier-config-standard","cause":"The package is not installed.","error":"Error: Cannot find module 'prettier-config-standard'"},{"fix":"If you want to extend the config, use: const prettierConfigStandard = require('prettier-config-standard') and then reference the string. For merging, use require.resolve('prettier-config-standard') to get the path, or just use the string directly in package.json.","cause":"The module exports a string, not an object. Using require returns the string, not a config object.","error":"Cannot read properties of undefined (reading 'someOption') when using require('prettier-config-standard') and merging"},{"fix":"Ensure your .prettierrc.json contains exactly \"prettier-config-standard\". For .prettierrc.js, use module.exports = 'prettier-config-standard';","cause":"You may be trying to use the config in a JSON file that expects a different format, or have a syntax error.","error":"Invalid configuration file: \"prettier-config-standard\" is not a valid configuration object or string"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}