Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@lukemorales/prettier-config

lukemorales101MIT1.1.1

📦 Install

readme

Prettier config

📦 Install

This Prettier config is available as a package on NPM, install with your favorite package manager:

npm install @lukemorales/prettier-config

⚡ Quick start

Add the following code to your package.json:

"prettier": "@lukemorales/prettier-config"

You can alternatively create a .prettierrc file in the root of your project's directory. Your .prettierrc file should look like this:

"@lukemorales/prettier-config"

Add scripts to your package.json to format and fix:

"scripts": {
  "format": "prettier --check .",
  "format:fix": "prettier --write ."
},

📝 Formatting configurations

This package exposes different formatting configurations:

Default

Contains opinionated formatting rules.

"prettier": "@lukemorales/prettier-config"

TailwindCSS

Extends the default configuration and adds the tailwindcss plugin.

"prettier": "@lukemorales/prettier-config/with-tailwind"

If you're using this configuration, make sure to install the prettier-plugin-tailwindcss peerDependency