@sanity/prettier-config
npm install --save-dev @sanity/prettier-config prettierThen 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,
}