Skip to content

Commit 5ca76aa

Browse files
added automated linting and formatting through husky hooks
1 parent c1b7b4d commit 5ca76aa

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

frontend/.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm run format
2+
npm run lint

frontend/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"build": "tsc && vite build",
99
"format": "prettier --write \"**/*.{ts,tsx}\"",
1010
"lint": "eslint --ext .ts --ext .tsx . --report-unused-disable-directives --max-warnings 0",
11-
"preview": "vite preview"
11+
"preview": "vite preview",
12+
"prepare": "husky"
1213
},
1314
"dependencies": {
1415
"@auth0/auth0-react": "^2.2.4",
@@ -47,6 +48,7 @@
4748
"eslint-config-prettier": "^8.5.0",
4849
"eslint-plugin-react-hooks": "^5.1.0",
4950
"eslint-plugin-react-refresh": "^0.4.3",
51+
"husky": "^9.1.7",
5052
"postcss": "^8.4.33",
5153
"prettier": "^2.7.1",
5254
"react-dropzone": "^14.3.5",

frontend/yarn.lock

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# yarn lockfile v1
33

44

5+
"@alloc/quick-lru@^5.2.0":
6+
version "5.2.0"
7+
resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30"
8+
integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==
9+
510
"@ampproject/remapping@^2.2.0":
611
version "2.3.0"
712
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4"
@@ -3745,6 +3750,11 @@ html-url-attributes@^3.0.0:
37453750
resolved "https://registry.yarnpkg.com/html-url-attributes/-/html-url-attributes-3.0.0.tgz#fc4abf0c3fb437e2329c678b80abb3c62cff6f08"
37463751
integrity sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==
37473752

3753+
husky@^9.1.7:
3754+
version "9.1.7"
3755+
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"
3756+
integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==
3757+
37483758
hyphenate-style-name@^1.0.3:
37493759
version "1.1.0"
37503760
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz#1797bf50369588b47b72ca6d5e65374607cf4436"
@@ -4068,8 +4078,8 @@ iterator.prototype@^1.1.2:
40684078
has-symbols "^1.0.3"
40694079
reflect.getprototypeof "^1.0.4"
40704080
set-function-name "^2.0.1"
4071-
jiti@^2.4.2:
40724081

4082+
jiti@^2.4.2:
40734083
version "2.4.2"
40744084
resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.4.2.tgz#d19b7732ebb6116b06e2038da74a55366faef560"
40754085
integrity sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==
@@ -4223,6 +4233,7 @@ lightningcss@^1.29.1:
42234233
lightningcss-linux-x64-musl "1.29.1"
42244234
lightningcss-win32-arm64-msvc "1.29.1"
42254235
lightningcss-win32-x64-msvc "1.29.1"
4236+
42264237
lines-and-columns@^1.1.6:
42274238
version "1.2.4"
42284239
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
@@ -4693,10 +4704,6 @@ node-releases@^2.0.18:
46934704
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f"
46944705
integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==
46954706

4696-
normalize-range@^0.1.2:
4697-
version "0.1.2"
4698-
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
4699-
integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==
47004707
47014708
version "0.2.1"
47024709
resolved "https://registry.yarnpkg.com/obj-case/-/obj-case-0.2.1.tgz#13a554d04e5ca32dfd9d566451fd2b0e11007f1a"
@@ -4881,11 +4888,6 @@ possible-typed-array-names@^1.0.0:
48814888
resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f"
48824889
integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==
48834890

4884-
postcss-value-parser@^4.2.0:
4885-
version "4.2.0"
4886-
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
4887-
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
4888-
48894891
postcss@^8.4.27, postcss@^8.4.33:
48904892
version "8.4.41"
48914893
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.41.tgz#d6104d3ba272d882fe18fc07d15dc2da62fa2681"
@@ -5665,12 +5667,12 @@ tabbable@^6.0.0:
56655667
version "6.2.0"
56665668
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97"
56675669
integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==
5668-
5670+
56695671
[email protected], tailwindcss@^4.0.7:
56705672
version "4.0.7"
56715673
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-4.0.7.tgz#b3e26a5dda77651808a873f1b535cc8c39fcb0ae"
56725674
integrity sha512-yH5bPPyapavo7L+547h3c4jcBXcrKwybQRjwdEIVAd9iXRvy/3T1CC6XSQEgZtRySjKfqvo3Cc0ZF1DTheuIdA==
5673-
5675+
56745676
tapable@^2.2.0:
56755677
version "2.2.1"
56765678
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"

0 commit comments

Comments
 (0)