prettier-config-cityssm

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

Prettier shared configuration for City of Sault Ste. Marie projects. Current stable version is 2.1.2, released monthly. It centralizes prettier settings (e.g., endOfLine: 'lf', disable formatting for embedded HTML, SQL support with presets for generic SQL, SQLite, SQL Server). Key differentiator: opinionated configuration tailored to city projects, includes SQL formatting, and ships TypeScript types. Releases are versioned semver with minor features and patches.

error Error: Cannot find module 'prettier-config-cityssm'
cause Package not installed or not in node_modules.
fix
Run npm install --save-dev prettier-config-cityssm and ensure it's a devDependency.
error SyntaxError: Unexpected token 'export'
cause Trying to use ESM `export` in a CommonJS file (e.g., .js file with no type: module in package.json).
fix
Rename file to .mjs or set "type": "module" in package.json. Alternatively, use CJS: module.exports = require('prettier-config-cityssm').
error TypeError: prettierConfig is not a function
cause Calling the default export as a function, but it's an object.
fix
Do not invoke it; use it directly as a config object: export { default } from 'prettier-config-cityssm'.
breaking Version 2.0.0 introduces SQL formatting support and presets for SQLite and SQL Server, which may override existing prettier settings if not used carefully.
fix Review your project's prettier configuration for SQL formatting conflicts. If you don't need SQL presets, ensure your prettier.config.js only extends the base config.
deprecated Version 1.x is deprecated; all projects should upgrade to v2 to get SQL formatting and other improvements.
fix Update to v2 by running `npm install prettier-config-cityssm@latest` and check for breaking changes.
gotcha The package exports a single default configuration object, not a function. Do not call it as a function.
fix Use `export { default } from 'prettier-config-cityssm'` or `module.exports = require('prettier-config-cityssm')`.
gotcha In version 2.1.0, embedded HTML formatting is disabled to avoid breaking template literals. If you rely on HTML formatting inside template literals, this may be unexpected.
fix If you need HTML formatting in template literals, override the setting in your project's prettier config.
gotcha The configuration enforces `endOfLine: 'lf'` since version 2.1.1. This may cause diff noise on Windows if your project uses CRLF.
fix Set `.gitattributes` to `* text=auto eol=lf` to normalize line endings, or override `endOfLine` in your project config.
npm install prettier-config-cityssm
yarn add prettier-config-cityssm
pnpm add prettier-config-cityssm

Install the package and set up prettier.config.js to use the shared configuration.

npm install --save-dev prettier-config-cityssm

# In prettier.config.js (ESM):
export { default } from 'prettier-config-cityssm'

# Or if using CJS (not recommended):
// prettier.config.js
module.exports = require('prettier-config-cityssm')