pretty-quick
Advanced tools
Comparing version 3.1.0 to 4.0.0
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
65570
0
38
827
8
144
5
1
+ Addedpicocolors@^1.0.0
+ Addedpicomatch@^3.0.1
+ Addedtslib@^2.6.2
+ Addedexeca@5.1.1(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedget-stream@6.0.1(transitive)
+ Addedhuman-signals@2.1.0(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedpicomatch@3.0.1(transitive)
+ Addedtslib@2.7.0(transitive)
+ Addedyocto-queue@0.1.0(transitive)
- Removedchalk@^3.0.0
- Removedmultimatch@^4.0.0
- Removed@types/minimatch@3.0.5(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedarray-differ@3.0.0(transitive)
- Removedarray-union@2.1.0(transitive)
- Removedarrify@2.0.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedchalk@3.0.0(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedexeca@4.1.0(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedget-stream@5.2.0(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhuman-signals@1.1.1(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedmultimatch@4.0.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpump@3.0.2(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedexeca@^5.1.1
Updatedfind-up@^5.0.0
Updatedignore@^5.3.0
Updatedmri@^1.2.0