From f609a06169579cc3c21a40c2c82b0179d0ee2d10 Mon Sep 17 00:00:00 2001 From: sidmohanty11 Date: Tue, 5 Jul 2022 00:24:04 +0530 Subject: [PATCH] husky pre-push hook --- .husky/pre-push | 6 ++++++ app/package.json | 2 +- cms/package.json | 2 +- package.json | 26 ++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 .husky/pre-push create mode 100644 package.json diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 00000000..9a398fcb --- /dev/null +++ b/.husky/pre-push @@ -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 diff --git a/app/package.json b/app/package.json index 0f8db36d..6ac2590b 100644 --- a/app/package.json +++ b/app/package.json @@ -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", diff --git a/cms/package.json b/cms/package.json index 0bccad62..48c4e635 100644 --- a/cms/package.json +++ b/cms/package.json @@ -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": { diff --git a/package.json b/package.json new file mode 100644 index 00000000..32778bd7 --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "rc4community", + "version": "1.0.0", + "description": "

Rocket.Chat for Communities

", + "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" + } +}