All Projects → azz → Pretty Quick

azz / Pretty Quick

Licence: mit
⚡ Get Pretty Quick

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Pretty Quick

Mevn Cli
Light speed setup for MEVN(Mongo Express Vue Node) Apps
Stars: ✭ 696 (-60.59%)
Mutual labels:  prettier, cli
Prettier Stylelint
code > prettier > stylelint > formatted code
Stars: ✭ 162 (-90.83%)
Mutual labels:  prettier, cli
Git Praise
A nicer git blame.
Stars: ✭ 24 (-98.64%)
Mutual labels:  prettier, cli
Prettier Eslint Cli
CLI for prettier-eslint
Stars: ✭ 451 (-74.46%)
Mutual labels:  prettier, cli
Prettier Package Json
Prettier formatter for package.json files
Stars: ✭ 86 (-95.13%)
Mutual labels:  prettier, cli
Genesis
Templating, scaffolding and generation tool
Stars: ✭ 122 (-93.09%)
Mutual labels:  cli
Riko
A Python stream processing engine modeled after Yahoo! Pipes
Stars: ✭ 1,571 (-11.04%)
Mutual labels:  cli
Dksnap
Docker Snapshots for Development and Test Data
Stars: ✭ 122 (-93.09%)
Mutual labels:  cli
Ds1054z
Python package for the Rigol DS1054Z Oscilloscope
Stars: ✭ 121 (-93.15%)
Mutual labels:  cli
Weave
A simple CLI router for wiring together several sources behind a single HTTP endpoint
Stars: ✭ 125 (-92.92%)
Mutual labels:  cli
Yaap
Yet Another (Swift) Argument Parser
Stars: ✭ 124 (-92.98%)
Mutual labels:  cli
Atbmarket
🎉 JUST FOR FUN :: npm package of ATB plastic bag
Stars: ✭ 123 (-93.04%)
Mutual labels:  cli
Symfony Demo App
A Symfony demo application with basic user management
Stars: ✭ 122 (-93.09%)
Mutual labels:  cli
Flow Cli
The Flow CLI is a command-line interface that provides useful utilities for building Flow applications
Stars: ✭ 123 (-93.04%)
Mutual labels:  cli
Pipenv Pipes
A PipEnv Environment Switcher
Stars: ✭ 122 (-93.09%)
Mutual labels:  cli
Clrcli
CLRCLI is an event-driven library for building line-art user interfaces in C#/.Net command-line applications.
Stars: ✭ 124 (-92.98%)
Mutual labels:  cli
Easycert
EasyCert quickly generates web server TLS certificates that have been self-signed by a private certificate authority that it also creates.
Stars: ✭ 121 (-93.15%)
Mutual labels:  cli
Ink Gradient
Gradient color component for Ink
Stars: ✭ 123 (-93.04%)
Mutual labels:  cli
Mcscript
A programming language for Minecraft Vanilla
Stars: ✭ 124 (-92.98%)
Mutual labels:  cli
Twurl
OAuth-enabled curl for the Twitter API
Stars: ✭ 1,648 (-6.68%)
Mutual labels:  cli

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:

npx -p prettier@latest -p pretty-quick pretty-quick

Note: You can (should) change latest to a specific version of Prettier.

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, add:

"husky": {
  "hooks": {
    "pre-commit": "pretty-quick --staged"
  }
}

demo

CLI Flags

--staged (only git)

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

Partially staged files will not be re-staged after formatting and pretty-quick will exit with a non-zero exit code. The intent is to abort the git commit and allow the user to amend their selective staging to include formatting fixes.

--no-restage (only git)

Use with the --staged flag to skip re-staging files after formatting.

--branch

When not in staged pre-commit mode, use this flag to compare changes with the specified branch. Defaults to master (git) / default (hg) branch.

--pattern

Filters the files for the given minimatch pattern.
For example pretty-quick --pattern "**/*.*(js|jsx)" or pretty-quick --pattern "**/*.js" --pattern "**/*.jsx"

--verbose

Outputs the name of each file right before it is proccessed. This can be useful if Prettier throws an error and you can't identify which file is causing the problem.

--bail

Prevent git commit if any files are fixed.

--check

Check that files are correctly formatted, but don't format them. This is useful on CI to verify that all changed files in the current branch were correctly formatted.

--no-resolve-config

Do not resolve prettier config when determining which files to format, just use standard set of supported file types & extensions prettier supports. This may be useful if you do not need any customization and see performance issues.

By default, pretty-quick will check your prettier configuration file for any overrides you define to support formatting of additional file extensions.

Example .prettierrc file to support formatting files with .cmp or .page extensions as html.

{
    "printWidth": 120,
    "bracketSpacing": false,
    "overrides": [
        {
            "files": "*.{cmp,page}",
            "options": {"parser": "html"}
        }
    ],
}

--ignore-path

Check an alternative file for ignoring files with the same format as .prettierignore. For example pretty-quick --ignore-path .gitignore

Configuration and Ignore Files

pretty-quick will respect your .prettierrc, .prettierignore, and .editorconfig files if you don't use --ignore-path . 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].