add husky precommit and pretty-quick script in package.json

pull/3961/head
Joseph Izang 1 year ago
parent 550dac3600
commit 975ec0370c
  1. 4
      .husky/pre-commit
  2. 10
      package.json

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

@ -112,7 +112,8 @@
"watch": "watchify apps/remix-ide/src/index.js -dv -p browserify-reload -o apps/remix-ide/build/app.js --exclude solc",
"reinstall": "rm ./node-modules/ -rf && rm yarn.lock && rm ./build/ -rf && yarn install & yarn run build",
"ganache-cli": "npx ganache-cli",
"build-contracts": "find ./node_modules/@openzeppelin/contracts | grep -i '.sol' > libs/remix-ui/editor/src/lib/providers/completion/contracts/contracts.txt && find ./node_modules/@uniswap/v3-core/contracts | grep -i '.sol' >> libs/remix-ui/editor/src/lib/providers/completion/contracts/contracts.txt"
"build-contracts": "find ./node_modules/@openzeppelin/contracts | grep -i '.sol' > libs/remix-ui/editor/src/lib/providers/completion/contracts/contracts.txt && find ./node_modules/@uniswap/v3-core/contracts | grep -i '.sol' >> libs/remix-ui/editor/src/lib/providers/completion/contracts/contracts.txt",
"prepare": "husky install"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.16.0",
@ -313,7 +314,7 @@
"gulp": "^4.0.2",
"hardhat": "^2.14.0",
"https-browserify": "^1.0.0",
"husky": "^8.0.3",
"husky": "^8.0.0",
"ipfs-http-client": "^47.0.1",
"ipfs-mini": "^1.1.5",
"is-electron": "^2.2.0",
@ -365,5 +366,10 @@
},
"resolutions": {
"@types/react": "^17.0.24"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged --pattern \"**/*.{js,jsx,ts,tsx}\""
}
}
}

Loading…
Cancel
Save