Package detail

@sanity/prettier-config

sanity-io18kMIT2.0.0

Sanity.io Prettier shared configuration

sanity, sanity.io, studio, prettier

readme

@sanity/prettier-config

npm stat npm version

npm install --save-dev @sanity/prettier-config prettier

Then add it to your package.json to install it:

   },
+  "prettier": "@sanity/prettier-config",
   "dependencies": {

When using pnpm you should add this to your .npmrc file:

public-hoist-pattern[]=*prettier*

If you need to add more plugins, or extend the configuration, you'll need to create a prettier.config.mjs, file instead of using the prettier field in package.json:

// prettier.config.mjs

import preset from '@sanity/prettier-config'

export default {
  ...preset,
  plugins: [...preset.plugins, 'prettier-plugin-tailwindcss'],
  experimentalTernaries: true,
}

Format in-browser with our settings

changelog

Changelog

2.0.0 (2025-06-24)

⚠ BREAKING CHANGES

  • add @prettier/plugin-oxc (#25)

Features

1.0.6 (2025-06-24)

Bug Fixes

  • deps: update dependency prettier to ^3.6.0 (#22) (588483d)

1.0.5 (2025-06-19)

Bug Fixes

1.0.4 (2025-06-16)

Bug Fixes

  • deps: update prettier-plugin-packagejson to v2.5.15 (e3c8ee5)

1.0.3 (2024-08-29)

Bug Fixes

1.0.2 (2024-04-18)

Bug Fixes

  • docs: incorrect setup instructions (e9c9447)

1.0.1 (2024-04-18)

Bug Fixes

1.0.0 (2024-04-18)

Features