Last active
July 9, 2020 10:49
-
-
Save LordKayBanks/81aa796a05f1b9dafb5d5a7bf30e076c to your computer and use it in GitHub Desktop.
NPM git pre-commit hook
This file contains hidden or 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
"scripts": { | |
"start:local": "react-scripts start --no-cache", | |
"start": "source dev.env && react-scripts start --no-cache", | |
"build": "react-scripts build", | |
"test": "react-scripts test --no-cache", | |
"eject": "react-scripts eject", | |
"prettier:fix": "prettier --write --no-config src/**/*.{js,ts,css.scss,json}", | |
"precommit": "lint-staged" | |
}, | |
"lint-staged": { | |
"*.{js,ts,css.scss,json}": [ | |
"prettier --write --no-config src/**/*.{js,ts,css.scss,json}", | |
"git add" | |
] | |
}, | |
"devDependencies": { | |
"husky": "^3.0.1", | |
"lint-staged": "^4.2.3", | |
"prettier": "^1.18.2" | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment