JSPM

  • Created
  • Published
  • Downloads 1983968
  • Score
    100M100P100Q254471F
  • License MIT

Get Pretty Quick

Package Exports

  • pretty-quick
  • pretty-quick/bin/pretty-quick
  • pretty-quick/bin/pretty-quick.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pretty-quick) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pretty-quick

Travis Prettier npm semantic-release License

Get Pretty Quick

Runs Prettier on your changed files.

demo

Supported source control managers:

  • Git
  • Mercurial

Install

With yarn:

yarn add --dev prettier pretty-quick

With npm:

npm install --save-dev prettier pretty-quick

Usage

With yarn:

yarn pretty-quick

With npx: (No install required)

npx pretty-quick

With npm:

  1. Add "pretty-quick": "pretty-quick" to the scripts section of package.json.
  2. npm run pretty-quick

Pre-Commit Hook

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

For Mercurial have a look at husky-hg

yarn add --dev husky

In package.json's "scripts" section, add:

"precommit": "pretty-quick --staged"

demo

CLI Flags

--staged

Pre-commit mode. Under this flag only staged files will be formatted, and they will be re-staged after formatting.

--branch

When not in staged pre-commit mode, use this flag to compare changes with the specified branch. Defaults to master branch.

Configuration and Ignore Files

pretty-quick will respect your .prettierrc and .prettierignore 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 working directory that the command was executed from.