{"id":13457634,"url":"https://github.com/prettier/pretty-quick","last_synced_at":"2025-05-14T13:00:24.944Z","repository":{"id":28176440,"uuid":"116580549","full_name":"prettier/pretty-quick","owner":"prettier","description":"⚡ Get Pretty Quick","archived":false,"fork":false,"pushed_at":"2025-03-25T07:15:29.000Z","size":3551,"stargazers_count":2251,"open_issues_count":18,"forks_count":84,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-05-07T12:45:08.966Z","etag":null,"topics":["cli","git","mercurial","prettier"],"latest_commit_sha":null,"homepage":"https://npm.im/pretty-quick","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prettier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"prettier","open_collective":"prettier","thanks_dev":"u/gh/prettier","tidelift":"npm/prettier"}},"created_at":"2018-01-07T16:23:17.000Z","updated_at":"2025-05-05T22:33:39.000Z","dependencies_parsed_at":"2024-01-07T00:08:10.570Z","dependency_job_id":"d5eb5801-272d-4abc-bbd8-f66dff56a96d","html_url":"https://github.com/prettier/pretty-quick","commit_stats":{"total_commits":89,"total_committers":27,"mean_commits":"3.2962962962962963","dds":0.696629213483146,"last_synced_commit":"b5e00ba235a246bc087e3b800ef96916f2e05684"},"previous_names":["prettier/pretty-quick","azz/pretty-quick"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fpretty-quick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fpretty-quick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fpretty-quick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prettier%2Fpretty-quick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prettier","download_url":"https://codeload.github.com/prettier/pretty-quick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253391178,"owners_count":21900943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","git","mercurial","prettier"],"created_at":"2024-07-31T09:00:32.317Z","updated_at":"2025-05-14T13:00:24.871Z","avatar_url":"https://github.com/prettier.png","language":"TypeScript","readme":"# `pretty-quick`\n\n[![GitHub Actions](https://github.com/prettier/pretty-quick/workflows/CI/badge.svg)](https://github.com/prettier/pretty-quick/actions/workflows/ci.yml)\n[![Codecov](https://img.shields.io/codecov/c/github/prettier/pretty-quick.svg)](https://codecov.io/gh/prettier/pretty-quick)\n[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage\u0026prefix=%E2%89%A5\u0026suffix=%\u0026query=$.typeCoverage.atLeast\u0026uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Flib-boilerplate%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)\n[![npm](https://img.shields.io/npm/v/pretty-quick.svg)](https://www.npmjs.com/package/pretty-quick)\n[![GitHub Release](https://img.shields.io/github/release/prettier/pretty-quick)](https://github.com/prettier/pretty-quick/releases)\n\n[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/changesets/changesets)\n\n\u003e Get Pretty Quick\n\nRuns [Prettier](https://prettier.io) on your changed files.\n\n![demo](./img/demo.gif)\n\nSupported source control managers:\n\n- Git\n- Mercurial\n\n## Install\n\n```sh\n# npm\nnpm install -D prettier pretty-quick\n```\n\n```sh\n# yarn\nyarn add -D prettier pretty-quick\n```\n\n## Usage\n\n```sh\n# npx\nnpx pretty-quick\n\n# yarn\nyarn pretty-quick\n```\n\n## Pre-Commit Hook\n\nYou can run `pretty-quick` as a `pre-commit` hook using [`simple-git-hooks`](https://github.com/toplenboren/simple-git-hooks).\n\n```sh\n# npm\nnpm install -D simple-git-hooks\n\n# yarn\nyarn add -D simple-git-hooks\n```\n\nIn `package.json`, add:\n\n```jsonc\n\"simple-git-hooks\": {\n  \"pre-commit\": \"yarn pretty-quick --staged\" // or \"npx pretty-quick --staged\"\n}\n```\n\n## CLI Flags\n\n### `--staged` (only git)\n\nPre-commit mode. Under this flag only staged files will be formatted, and they will be re-staged after formatting.\n\nPartially 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.\n\n### `--no-restage` (only git)\n\nUse with the `--staged` flag to skip re-staging files after formatting.\n\n### `--branch`\n\nWhen not in `staged` pre-commit mode, use this flag to compare changes with the specified branch. Defaults to `master` (git) / `default` (hg) branch.\n\n### `--pattern`\n\nFilters the files for the given [minimatch](https://github.com/isaacs/minimatch) pattern.\nFor example `pretty-quick --pattern \"**/*.*(js|jsx)\"` or `pretty-quick --pattern \"**/*.js\" --pattern \"**/*.jsx\"`\n\n### `--verbose`\n\nOutputs the name of each file right before it is processed. This can be useful if Prettier throws an error and you can't identify which file is causing the problem.\n\n### `--bail`\n\nPrevent `git commit` if any files are fixed.\n\n### `--check`\n\nCheck 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.\n\n### `--no-resolve-config`\n\nDo not resolve prettier config when determining which files to format, just use standard set of supported file types \u0026 extensions prettier supports. This may be useful if you do not need any customization and see performance issues.\n\nBy default, pretty-quick will check your prettier configuration file for any overrides you define to support formatting of additional file extensions.\n\nExample `.prettierrc` file to support formatting files with `.cmp` or `.page` extensions as html.\n\n```json\n{\n  \"printWidth\": 120,\n  \"bracketSpacing\": false,\n  \"overrides\": [\n    {\n      \"files\": \"*.{cmp,page}\",\n      \"options\": { \"parser\": \"html\" }\n    }\n  ]\n}\n```\n\n\u003c!-- Undocumented = Unsupported :D\n\n### `--config`\n\nPath to a `.prettierrc` file.\n\n### `--since`\n\nA SCM revision such as a git commit hash or ref.\n\nFor example `pretty-quick --since HEAD` will format only staged files.\n\n--\u003e\n\n### `--ignore-path`\n\nCheck an alternative file for ignoring files with the same format as [`.prettierignore`](https://prettier.io/docs/en/ignore#ignoring-files).\nFor example `pretty-quick --ignore-path .gitignore`\n\n## Configuration and Ignore Files\n\n`pretty-quick` will respect your [`.prettierrc`](https://prettier.io/docs/en/configuration), [`.prettierignore`](https://prettier.io/docs/en/ignore#ignoring-files), and [`.editorconfig`](http://editorconfig.org/) 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.\n","funding_links":["https://github.com/sponsors/prettier","https://opencollective.com/prettier","https://thanks.dev/u/gh/prettier","https://tidelift.com/funding/github/npm/prettier"],"categories":["TypeScript","cli","git"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprettier%2Fpretty-quick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprettier%2Fpretty-quick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprettier%2Fpretty-quick/lists"}