prettier-config-ackama

raw JSON →
1.3.0 verified Sat Apr 25 auth: no javascript

Standard Prettier configuration for Ackama projects. Version 1.3.0 is the current stable release. The config enforces single quotes for JavaScript/TypeScript and has been updated to use single quotes for CSS, Sass, SCSS, Less, and HTML since v1.3.0, preserve whitespace significance in HTML since v1.2.0, and replaced deprecated `jsxBracketSameLine` with `bracketSameLine` in v1.1.0. Key differentiator: opinionated, organization-wide default that can be shared across projects. Peer dependency on Prettier >= 2.0. Released via semantic-release.

error Error: Could not resolve 'prettier-config-ackama'
cause Prettier is not installed or version is < 2.0
fix
Run npm install --save-dev prettier@>=2.0
error Error: Cannot find module 'prettier-config-ackama'
cause Package not installed in node_modules or missing from package.json
fix
Run npm install --save-dev prettier-config-ackama
error Cannot assign to read only property 'singleQuote' of object '#<Object>'
cause Attempting to mutate the imported config object directly
fix
Use spread operator: { ...ackamaConfig, singleQuote: false } instead of ackamaConfig.singleQuote = false
breaking v1.3.0 changed default quote style for CSS/SCSS/Sass/Less/HTML from double to single quotes.
fix Update projects or override with `singleQuote: false` in user config.
breaking v1.2.0 changed `htmlWhitespaceSensitivity` from 'ignore' to 'css', affecting HTML formatting.
fix Explicitly set `htmlWhitespaceSensitivity` in user config if default behavior breaks formatting.
deprecated Option `jsxBracketSameLine` was deprecated and replaced by `bracketSameLine` in v1.1.0.
fix Use `bracketSameLine` instead.
gotcha This config does not include a `semi` override; Prettier defaults to `semi: true`. Users must explicitly set `semi: false` if desired.
fix Add `semi: false` in user override if trailing semicolons are not wanted.
npm install prettier-config-ackama
yarn add prettier-config-ackama
pnpm add prettier-config-ackama

Install peer dependency and config package, then reference in package.json or extend in a config file.

npm install --save-dev prettier prettier-config-ackama
# Add to package.json:
# "prettier": "prettier-config-ackama"
# Or create prettier.config.js (ESM):
# import ackamaConfig from 'prettier-config-ackama';
# export default {
#   ...ackamaConfig,
#   semi: false
# }