Skip to content

Commit

Permalink
husky pre-push hook
Browse files Browse the repository at this point in the history
  • Loading branch information
sidmohanty11 committed Jul 4, 2022
1 parent 9d81978 commit f609a06
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd cms && npm run format && npm run lint
cd ..
cd app && npm run format && npm run lint
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"export": "next export",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
"format": "prettier --write . --loglevel silent"
},
"dependencies": {
"@apollo/client": "^3.5.9",
Expand Down
2 changes: 1 addition & 1 deletion cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi",
"format": "prettier --write .",
"format": "prettier --write . --loglevel silent",
"lint": "eslint '**/*.js' --fix"
},
"devDependencies": {
Expand Down
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "rc4community",
"version": "1.0.0",
"description": "<h1 align='center'>Rocket.Chat for Communities </h1>",
"main": "index.js",
"directories": {
"doc": "docs"
},
"scripts": {
"prepare": "husky install"
},
"repository": {
"type": "git",
"url": "git+https://github.com/RocketChat/RC4Community.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/RocketChat/RC4Community/issues"
},
"homepage": "https://github.com/RocketChat/RC4Community#readme",
"devDependencies": {
"husky": "^8.0.0"
}
}

0 comments on commit f609a06

Please sign in to comment.