From e3e17652c7d90fed0f981d68b875fec9ce71d041 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 19 May 2021 10:33:26 +0530 Subject: [Housekeeping] Added missing hygiene configs/files for developer/contributor. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index 0f1f969..afef829 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ recipes/ resources/announcements/*.json !resources/announcements/version.json npm-debug.log +yarn-error.log +server*.log +.idea -- cgit v1.2.3-54-g00ecf From dceaf5938cc9d148d1737fff3ddb1c6ab762234c Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 19 May 2021 11:11:08 +0530 Subject: Added husky pre-commit hook to run linter --- .gitignore | 4 ++-- .husky/.gitignore | 1 + .husky/pre-commit | 4 ++++ package-lock.json | 6 ++++++ package.json | 4 +++- 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .husky/.gitignore create mode 100755 .husky/pre-commit (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index afef829..79f578b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ tmp .env # The development sqlite file -database/development.sqlite -database/adonis.sqlite +data*/development.sqlite +data*/adonis.sqlite # Uploaded recipes recipes/ diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..20d0d06 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run lint diff --git a/package-lock.json b/package-lock.json index 6680dae..f7d1388 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3122,6 +3122,12 @@ } } }, + "husky": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", + "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/package.json b/package.json index 85a2082..6fc32a1 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "node-gyp": "^8.0" }, "scripts": { + "prepare": "husky install", "start": "node server.js", "test": "node ace test", "lint": "eslint --quiet --fix ./" @@ -53,7 +54,8 @@ "eslint-plugin-import": "^2.20.2", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-react": "^7.19.0", - "eslint-plugin-react-hooks": "^1.7.0" + "eslint-plugin-react-hooks": "^1.7.0", + "husky": "^6.0.0" }, "autoload": { "App": "./app" -- cgit v1.2.3-54-g00ecf