Socket
Socket
Sign inDemoInstall

pretty-quick

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-quick - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

lib/cli.d.mts

79

package.json
{
"name": "pretty-quick",
"version": "3.1.0",
"version": "4.0.0",
"description": "Get Pretty Quick",
"repository": "azz/pretty-quick",
"repository": "prettier/pretty-quick",
"author": "Lucas Azzola <@azz>",
"main": "./dist",
"bin": "./bin/pretty-quick.js",
"license": "MIT",
"engines": {
"node": ">=10.13"
"node": ">=14"
},
"bin": "lib/cli.mjs",
"main": "lib/index.js",
"module": "lib/index.esm.mjs",
"exports": {
".": {
"types": "./lib/index.d.ts",
"require": "./lib/index.js",
"default": "./lib/index.esm.mjs"
},
"./*": "./lib/*.js",
"./package.json": "./package.json"
},
"types": "lib/index.d.ts",
"files": [
"bin",
"img",
"lib",
"!**/*.tsbuildinfo"
],
"keywords": [

@@ -24,46 +41,14 @@ "git",

],
"files": [
"bin",
"dist",
"img"
],
"dependencies": {
"chalk": "^3.0.0",
"execa": "^4.0.0",
"find-up": "^4.1.0",
"ignore": "^5.1.4",
"mri": "^1.1.5",
"multimatch": "^4.0.0"
},
"scripts": {
"prepublishOnly": "yarn build",
"pretty-quick": "./bin/pretty-quick.js",
"build": "babel src -d dist --copy-files --no-copy-ignored --ignore '**/__tests__/*.js'",
"test": "jest",
"lint": "eslint . --ignore-path=.gitignore",
"semantic-release": "semantic-release"
},
"husky": {
"hooks": {
"pre-commit": "./bin/pretty-quick.js --staged"
}
},
"prettier": "@azz/prettier-config",
"peerDependencies": {
"prettier": ">=2.0.0"
"prettier": "^3.0.0"
},
"devDependencies": {
"@azz/prettier-config": "^1.0.0",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.2",
"husky": "^4.2.3",
"jest": "^25.2.3",
"mock-fs": "^4.11.0",
"prettier": "2.0.2"
"dependencies": {
"execa": "^5.1.1",
"find-up": "^5.0.0",
"ignore": "^5.3.0",
"mri": "^1.2.0",
"picocolors": "^1.0.0",
"picomatch": "^3.0.1",
"tslib": "^2.6.2"
}
}
}
# `pretty-quick`
[![Travis](https://img.shields.io/travis/azz/pretty-quick.svg?style=flat-square)](https://travis-ci.org/azz/pretty-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/pretty-quick.svg?style=flat-square)](https://npmjs.org/pretty-quick)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
[![GitHub Actions](https://github.com/prettier/pretty-quick/workflows/CI/badge.svg)](https://github.com/prettier/pretty-quick/actions/workflows/ci.yml)
[![Codecov](https://img.shields.io/codecov/c/github/prettier/pretty-quick.svg)](https://codecov.io/gh/prettier/pretty-quick)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Flib-boilerplate%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
[![npm](https://img.shields.io/npm/v/pretty-quick.svg)](https://www.npmjs.com/package/pretty-quick)
[![GitHub Release](https://img.shields.io/github/release/prettier/pretty-quick)](https://github.com/prettier/pretty-quick/releases)
[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/changesets/changesets)
> Get Pretty Quick

@@ -22,12 +28,10 @@

With `yarn`:
```shellsession
yarn add --dev prettier pretty-quick
```sh
# npm
npm install -D prettier pretty-quick
```
With `npm`:
```shellsession
npm install --save-dev prettier pretty-quick
```sh
# yarn
yarn add -D prettier pretty-quick
```

@@ -37,29 +41,20 @@

With `yarn`:
```sh
# npx
npx pretty-quick
```shellsession
# yarn
yarn pretty-quick
```
With [`npx`](https://npm.im/npx):
```shellsession
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`](https://github.com/typicode/husky).
You can run `pretty-quick` as a `pre-commit` hook using [`simple-git-hooks`](https://github.com/toplenboren/simple-git-hooks).
> For Mercurial have a look at [`husky-hg`](https://github.com/TobiasTimm/husky-hg)
```sh
# npm
npm install -D simple-git-hooks
```shellstream
yarn add --dev husky
# yarn
yarn add -D simple-git-hooks
```

@@ -70,11 +65,7 @@

```json
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
"simple-git-hooks": {
"pre-commit": "pretty-quick --staged"
}
```
![demo](./img/precommit.gif)
## CLI Flags

@@ -98,3 +89,3 @@

Filters the files for the given [minimatch](https://github.com/isaacs/minimatch) pattern.
Filters the files for the given [minimatch](https://github.com/isaacs/minimatch) pattern.
For example `pretty-quick --pattern "**/*.*(js|jsx)"` or `pretty-quick --pattern "**/*.js" --pattern "**/*.jsx"`

@@ -104,3 +95,3 @@

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.
Outputs 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.

@@ -123,12 +114,12 @@ ### `--bail`

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

@@ -154,3 +145,3 @@ ```

Check an alternative file for ignoring files with the same format as [`.prettierignore`](https://prettier.io/docs/en/ignore#ignoring-files).
For example `pretty-quick --ignore-path=.gitignore`
For example `pretty-quick --ignore-path .gitignore`

@@ -157,0 +148,0 @@ ## Configuration and Ignore Files

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc