Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Prettify your code in pre-commit
{
"name": "prettierdemo",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
},
"devDependencies": {
"husky": "^0.14.3",
"lint-staged": "^5.0.0",
"prettier": "^1.8.2"
},
"scripts": {
"precommit": "lint-staged"
},
"lint-staged": {
"*.js": [
"prettier --single-quote --tab-width 4 --write",
"git add"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment