diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 05c41008..4267cebb 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -326,13 +326,14 @@ yarn add husky lint-staged prettier Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. -Add the following line to `scripts` section: +Add the following field to the `package.json` section: ```diff - "scripts": { -+ "precommit": "lint-staged", - "start": "react-scripts start", - "build": "react-scripts build", ++ "husky": { ++ "hooks": { ++ "pre-commit": "lint-staged" ++ } ++ } ``` Next we add a 'lint-staged' field to the `package.json`, for example: