@mintlify/prettier-config

1.0.6 • Public • Published

Shared Prettier configuration

Prettier is used for code formatting.

Add Dependencies

Install this package and peerDependencies of this package as devDependencies in the project, using install-peerdeps.

npx install-peerdeps --dev @mintlify/prettier-config

Alternatively, you can install this package as devDependency and install the peerDependencies separately.

# yarn
yarn add -D @mintlify/prettier-config

# npm
npm i -D @mintlify/prettier-config

# pnpm
pnpm add -D @mintlify/prettier-config

Add Configuration File

Create a .prettierrc file in the project root with the following content:

"@mintlify/prettier-config/config.js"

Add Formatting Scripts

Add the following package.json scripts (with the appropriate file extensions for the project):

"scripts": {
    "format": "prettier \"**/*.{css,js,ts,tsx,md,mdx}\" --write",
    "format:check": "prettier \"**/*.{css,js,ts,tsx,md,mdx}\" --check",
    ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i @mintlify/prettier-config

Weekly Downloads

169

Version

1.0.6

License

MIT

Unpacked Size

2.17 kB

Total Files

3

Last publish

Collaborators

  • ronan-mintlify
  • hahnbee
  • hanmint