diff options
author | Vijay A <avijayr@protonmail.com> | 2021-05-19 11:11:08 +0530 |
---|---|---|
committer | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-05-19 12:03:29 +0530 |
commit | dceaf5938cc9d148d1737fff3ddb1c6ab762234c (patch) | |
tree | 2d68e6e67da811889b44b80e808aa99c1cc889f1 | |
parent | Fixed #56: Added favicon for all html pages served by the server. (diff) | |
download | ferdium-server-dceaf5938cc9d148d1737fff3ddb1c6ab762234c.tar.gz ferdium-server-dceaf5938cc9d148d1737fff3ddb1c6ab762234c.tar.zst ferdium-server-dceaf5938cc9d148d1737fff3ddb1c6ab762234c.zip |
Added husky pre-commit hook to run linter
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | .husky/.gitignore | 1 | ||||
-rwxr-xr-x | .husky/pre-commit | 4 | ||||
-rw-r--r-- | package-lock.json | 6 | ||||
-rw-r--r-- | package.json | 4 |
5 files changed, 16 insertions, 3 deletions
@@ -8,8 +8,8 @@ tmp | |||
8 | .env | 8 | .env |
9 | 9 | ||
10 | # The development sqlite file | 10 | # The development sqlite file |
11 | database/development.sqlite | 11 | data*/development.sqlite |
12 | database/adonis.sqlite | 12 | data*/adonis.sqlite |
13 | 13 | ||
14 | # Uploaded recipes | 14 | # Uploaded recipes |
15 | recipes/ | 15 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | . "$(dirname "$0")/_/husky.sh" | ||
3 | |||
4 | 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 @@ | |||
3122 | } | 3122 | } |
3123 | } | 3123 | } |
3124 | }, | 3124 | }, |
3125 | "husky": { | ||
3126 | "version": "6.0.0", | ||
3127 | "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", | ||
3128 | "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", | ||
3129 | "dev": true | ||
3130 | }, | ||
3125 | "iconv-lite": { | 3131 | "iconv-lite": { |
3126 | "version": "0.4.24", | 3132 | "version": "0.4.24", |
3127 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", | 3133 | "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 @@ | |||
10 | "node-gyp": "^8.0" | 10 | "node-gyp": "^8.0" |
11 | }, | 11 | }, |
12 | "scripts": { | 12 | "scripts": { |
13 | "prepare": "husky install", | ||
13 | "start": "node server.js", | 14 | "start": "node server.js", |
14 | "test": "node ace test", | 15 | "test": "node ace test", |
15 | "lint": "eslint --quiet --fix ./" | 16 | "lint": "eslint --quiet --fix ./" |
@@ -53,7 +54,8 @@ | |||
53 | "eslint-plugin-import": "^2.20.2", | 54 | "eslint-plugin-import": "^2.20.2", |
54 | "eslint-plugin-jsx-a11y": "^6.2.3", | 55 | "eslint-plugin-jsx-a11y": "^6.2.3", |
55 | "eslint-plugin-react": "^7.19.0", | 56 | "eslint-plugin-react": "^7.19.0", |
56 | "eslint-plugin-react-hooks": "^1.7.0" | 57 | "eslint-plugin-react-hooks": "^1.7.0", |
58 | "husky": "^6.0.0" | ||
57 | }, | 59 | }, |
58 | "autoload": { | 60 | "autoload": { |
59 | "App": "./app" | 61 | "App": "./app" |