Socket
Book a DemoInstallSign in
Socket

@mintlify/prettier-config

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mintlify/prettier-config

Mintlify shared prettier config

latest
Source
npmnpm
Version
1.0.6
Version published
Weekly downloads
320
23.08%
Maintainers
3
Weekly downloads
 
Created
Source

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",
    ...
}

FAQs

Package last updated on 08 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts