[](https://github.com/prettier/prettier) [](https://npmjs.org/prettier-quick)
npm install prettier-quickprettier-quick

> Get Prettier Quick
Runs Prettier on your changed files.
Supported source control managers:
* Git
With yarn:
``shellsession`
yarn add --dev prettier prettier-quick
With npm:
`shellsession`
npm install --save-dev prettier prettier-quick
You can run prettier-quick as a pre-commit hook using husky.
> For Mercurial have a look at husky-hg
With yarn:
`shellsession`
yarn add --dev lint-staged husky
With npm:
`shellsession`
npm install --save-dev lint-staged husky
In package.json, add:
``
{
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/*/.{js,json,css,less,scss,html,md,vue,jsx}": [
"./node_modules/.bin/prettier --config ./node_modules/prettier-quick/.prettierrc --write",
"git add"
]
},
}
prettier-quick will respect your .prettierrc, .prettierignore, and .editorconfig files, so there's no additional setup required. 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.