Socket
Book a DemoInstallSign in
Socket

prettier-quick

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-quick

[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) [![npm](https://img.shields.io/npm/v/prettier-quick.svg?style=flat-square)](https://npmjs.org/prettier-quick)

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
49K
76.03%
Maintainers
1
Weekly downloads
 
Created
Source

prettier-quick

Prettier npm

Get Prettier Quick

Runs Prettier on your changed files.

Supported source control managers:

  • Git

Install

With yarn:

yarn add --dev prettier prettier-quick

With npm:

npm install --save-dev prettier prettier-quick

Pre-Commit Hook

You can run prettier-quick as a pre-commit hook using husky.

For Mercurial have a look at husky-hg

With yarn:

yarn add --dev lint-staged husky

With npm:

npm install --save-dev lint-staged husky

In package.json, add:

{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
      "src/**/*.{js,json,css,less,scss,html,md,vue,jsx}": [
          "./node_modules/.bin/prettier --config ./node_modules/prettier-quick/.prettierrc --write",
          "git add"
      ]
  },
}

Configuration and Ignore Files

prettier-quick will respect your .prettierrc, .prettierignore, and .editorconfig files, so there's no additional setup required. Configuration files will be found by searching up the file system. .prettierignore files are only found from the repository root and the working directory that the command was executed from.

FAQs

Package last updated on 12 Feb 2019

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