Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Pretty Quick | 2,072 | 5,008 | 10,524 | 3 months ago | 31 | December 22, 2021 | 42 | mit | JavaScript | |
⚡ Get Pretty Quick | ||||||||||
Vim Prettier | 1,690 | 3 months ago | 58 | mit | Vim script | |||||
A Vim plugin for Prettier | ||||||||||
Mrm | 1,524 | 87 | 363 | 11 days ago | 90 | July 04, 2023 | 9 | mit | JavaScript | |
Codemods for your project config files | ||||||||||
Vue Web Extension | 1,523 | 1 | 5 months ago | 1 | October 23, 2018 | 18 | mit | JavaScript | ||
🛠️ A Vue CLI 3+ preset (previously a Vue CLI 2 boilerplate) for quickly starting a web extension with Vue, Babel, ESLint and more! | ||||||||||
Mevn Cli | 812 | 5 days ago | 54 | February 28, 2021 | 22 | mit | JavaScript | |||
Light speed setup for MEVN(Mongo Express Vue Node) Apps | ||||||||||
Prettier Eslint Cli | 512 | 3,737 | 2,559 | a year ago | 65 | August 25, 2022 | 4 | mit | JavaScript | |
CLI for prettier-eslint | ||||||||||
Create Next Stack | 494 | 2 | 3 months ago | 17 | March 24, 2023 | 53 | mit | TypeScript | ||
Create Next Stack is a website and CLI tool used to easily set up the boilerplate of new Next.js apps. | ||||||||||
Web Scripts | 373 | 8 | 36 | a month ago | 66 | August 08, 2022 | 16 | apache-2.0 | TypeScript | |
A collection of base configs and CLI wrappers used to speed up development @ Spotify. | ||||||||||
Addons Linter | 282 | 453 | 9 | 3 days ago | 254 | December 12, 2022 | 36 | mpl-2.0 | JavaScript | |
🔍 Firefox Add-ons linter, written in JavaScript. 👁 | ||||||||||
Prettier Stylelint | 153 | 459 | 560 | 3 years ago | 11 | September 25, 2017 | 41 | mit | JavaScript | |
code > prettier > stylelint > formatted code |
pretty-quick
Get Pretty Quick
Runs Prettier on your changed files.
Supported source control managers:
With yarn
:
yarn add --dev prettier pretty-quick
With npm
:
npm install --save-dev prettier pretty-quick
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
:
"pretty-quick": "pretty-quick"
to the "scripts"
section of package.json
.npm run pretty-quick
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"
}
}
--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
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.