sanity-io / prettier-config

Shared Prettier configuration following Sanity Engineering conventions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@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": {

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

// .prettierrc.cjs or prettier.config.cjs

const preset = require('@sanity/prettier-config')

module.exports = {
  ...preset,
  plugins: [...preset.plugins, 'prettier-plugin-tailwindcss'],
  experimentalTernaries: true,
}

About

Shared Prettier configuration following Sanity Engineering conventions

License:MIT License


Languages

Language:TypeScript 96.5%Language:JavaScript 3.5%