File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,16 @@ For example, you can do the following to have Prettier run before each commit:
121121
122122 ``` bash
123123 npm install --save-dev husky lint-staged
124- npx husky install
125- npm pkg set scripts.prepare=" husky install"
126- npx husky add .husky/pre-commit " npx lint-staged"
124+ npx husky init
125+ node --eval " fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')"
127126 ```
128127
129128 <!-- yarn-->
130129
131130 ``` bash
132131 yarn add --dev husky lint-staged
133- npx husky install
134- npm pkg set scripts.prepare=" husky install"
135- npx husky add .husky/pre-commit " npx lint-staged"
132+ npx husky init
133+ node --eval " fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')"
136134 ```
137135
138136 > If you use Yarn 2, see https://typicode.github.io/husky/#/?id=yarn-2
@@ -141,9 +139,8 @@ For example, you can do the following to have Prettier run before each commit:
141139
142140 ``` bash
143141 pnpm add --save-dev husky lint-staged
144- pnpm exec husky install
145- npm pkg set scripts.prepare=" husky install"
146- pnpm exec husky add .husky/pre-commit " pnpm exec lint-staged"
142+ npx husky init
143+ node --eval " fs.writeFileSync('.husky/pre-commit','pnpm exec lint-staged\n')"
147144 ```
148145
149146 <!-- END_DOCUSAURUS_CODE_TABS-->
You can’t perform that action at this time.
0 commit comments