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.
npm install prettier-config-standardVerified import paths — ran on the pinned version, not inferred.
Installs the shared config and uses it via .prettierrc.js or package.json, then formats a file.
Update code to include parentheses on all arrow function parameters, or pin to v3.x if needed.
Upgrade Prettier to ^2.4.0 or later. If you must use older Prettier, stay on v4.x.
Ensure your editor and git config handle LF line endings. Optionally override endOfLine in your own Prettier config.
Use Prettier ^3.0.0 if possible; otherwise ensure your Prettier version satisfies '^2.6.0 || ^3.0.0'.
Ensure you also install Prettier separately: npm install --save-dev prettier
Run: npm install --save-dev prettier-config-standard
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.Ensure your .prettierrc.json contains exactly "prettier-config-standard". For .prettierrc.js, use module.exports = 'prettier-config-standard';