Skip to content

Instantly share code, notes, and snippets.

@perry-mitchell
Created September 19, 2017 05:36
Show Gist options
  • Save perry-mitchell/95a0213c9ccc2e68491e7b2a2966a522 to your computer and use it in GitHub Desktop.
Save perry-mitchell/95a0213c9ccc2e68491e7b2a2966a522 to your computer and use it in GitHub Desktop.
Prettier on commit configuration
{
"name": "project",
"version": "0.0.0",
"scripts": {
"format": "prettier --tab-width 4 --print-width 120 --write 'source/**/*.js'",
"precommit": "lint-staged",
"test": "echo \"nothing yet\"",
"test:format": "prettier-check --tab-width 4 --print-width 120 'source/**/*.js'"
},
"lint-staged": {
"source/**/*.js": [
"prettier --tab-width 4 --print-width 120 --write",
"git add"
]
},
"author": "Person",
"license": "UNLICENSED",
"devDependencies": {
"husky": "^0.14.3",
"lint-staged": "^4.1.0",
"prettier": "^1.6.1",
"prettier-check": "^1.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment