Created
November 11, 2017 17:00
-
-
Save vijayst/6df8cf86473f4e40e39b8716fceadc9c to your computer and use it in GitHub Desktop.
Prettify your code in pre-commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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