Skip to content

Commit b081c73

Browse files
committed
Merge branch 'faris/cypress-pipeline' of https://github.com/acmucsd/membership-portal-ui-v2 into faris/cypress-pipeline
2 parents e78d4fe + d603119 commit b081c73

File tree

238 files changed

+12999
-2610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+12999
-2610
lines changed

.env.example

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
NEXT_PUBLIC_ACM_API_URL="https://api.acmucsd.com/api/v2"
1+
NEXT_PUBLIC_ACM_API_URL="https://api.acmucsd.com/api/v2"
2+
NEXT_PUBLIC_KLEFKI_API_URL=""
3+
NEXT_PUBLIC_TOTP_KEY=""

.eslintrc.json

+10-32
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
{
22
"parser": "@typescript-eslint/parser",
3-
"extends": [
4-
"airbnb",
5-
"prettier",
6-
"next",
7-
"next/core-web-vitals",
8-
"plugin:cypress/recommended"
9-
],
10-
"plugins": [
11-
"prettier",
12-
"node",
13-
"@typescript-eslint",
14-
"import",
15-
"jsdoc"
16-
],
3+
"extends": ["airbnb", "prettier", "next", "next/core-web-vitals", "plugin:cypress/recommended"],
4+
"plugins": ["prettier", "node", "@typescript-eslint", "import", "jsdoc"],
175
"rules": {
186
"prettier/prettier": "error",
19-
"no-unused-vars": "warn",
7+
"@typescript-eslint/no-unused-vars": ["warn", { "varsIgnorePattern": "^_$" }],
208
"no-console": "error",
219
"func-names": "off",
2210
"no-process-exit": "off",
@@ -27,38 +15,28 @@
2715
"import/extensions": "off",
2816
"no-shadow": "off",
2917
"react/require-default-props": "off",
18+
"jsx-a11y/control-has-associated-label": "off",
19+
"jsx-a11y/label-has-associated-control": [2, { "assert": "either" }],
3020
"jsx-a11y/anchor-is-valid": [
3121
"error",
3222
{
33-
"components": [
34-
"Link"
35-
],
36-
"specialLink": [
37-
"to"
38-
]
23+
"components": ["Link"],
24+
"specialLink": ["to"]
3925
}
4026
],
4127
"react/jsx-filename-extension": [
4228
2,
4329
{
44-
"extensions": [
45-
".js",
46-
".jsx",
47-
".ts",
48-
".tsx"
49-
]
30+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
5031
}
5132
],
5233
"react/function-component-definition": [
5334
2,
5435
{
55-
"namedComponents": [
56-
"arrow-function",
57-
"function-declaration"
58-
],
36+
"namedComponents": ["arrow-function", "function-declaration"],
5937
"unnamedComponents": "arrow-function"
6038
}
6139
]
6240
},
6341
"ignorePatterns": "src/**/*.d.ts"
64-
}
42+
}

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- @farisashai
1+
* @farisashai @raymosun @trevorkw7 @sheeptester @alexzhang1618

.github/workflows/label_ready_pr_to_merge.yml

-13
This file was deleted.

next.config.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1+
const env = process.env.NODE_ENV;
2+
const isDevelopment = env !== 'production';
3+
14
/** @type {import('next').NextConfig} */
25
const nextConfig = {
36
eslint: {
47
dirs: ['.'],
58
},
9+
i18n: {
10+
locales: ['en'],
11+
defaultLocale: 'en',
12+
},
613
images: {
7-
domains: ['acmucsd.s3.us-west-1.amazonaws.com'],
14+
domains: [
15+
'acmucsd.s3-us-west-1.amazonaws.com',
16+
'acmucsd.s3.us-west-1.amazonaws.com',
17+
// This one's for Sumeet Bansal
18+
'acmucsd.s3-us-west-1.amazonaws.com',
19+
'acmucsd-membership-portal.s3.us-west-1.amazonaws.com',
20+
// The dev backend test data uses image URLs outside the allowlist
21+
...(isDevelopment
22+
? ['i.imgur.com', 'i.pinimg.com', 'i.etsystatic.com', 'www.google.com']
23+
: []),
24+
],
825
},
926
poweredByHeader: false,
1027
trailingSlash: false,

package.json

+13-8
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
"lint:css": "stylelint \"**/*.scss\"",
1515
"lint": "yarn lint:js && yarn lint:css",
1616
"lint:fix": "yarn prettier && eslint --fix \"src/**/*.+(js|jsx|ts|tsx)\" && stylelint --fix \"**/*.scss\"",
17-
"type-css": "yarn typed-scss-modules src/ --exportType default",
17+
"type-css": "yarn typed-scss-modules src/ --exportType default --logLevel silent --watch",
1818
"dev": "next dev",
1919
"run": "yarn type-css & yarn lint && next dev",
2020
"build": "next build",
2121
"start": "next start",
22-
"prod": "yarn type-css && yarn lint && next build && next start",
22+
"prod": "next build && next start",
2323
"test": "yarn cypress run",
2424
"test:ui": "yarn cypress open"
2525
},
@@ -29,11 +29,12 @@
2929
"@mui/material": "^5.11.6",
3030
"@next/env": "^13.2.4",
3131
"@svgr/webpack": "^6.5.1",
32-
"axios": "^1.1.3",
32+
"axios": "^1.6.0",
3333
"axios-middleware": "^0.3.1",
3434
"cookies-next": "^2.1.1",
35-
"cypress": "^12.9.0",
36-
"lodash": "^4.17.21",
35+
"cypress": "^13.2.0",
36+
"ics": "^3.7.2",
37+
"luxon": "^3.3.0",
3738
"next": "^13.2.5-canary.30",
3839
"next-themes": "^0.2.1",
3940
"react": "18.2.0",
@@ -42,12 +43,15 @@
4243
"react-icons": "^4.4.0",
4344
"react-toastify": "^9.0.8",
4445
"sass": "^1.55.0",
45-
"sharp": "^0.31.3",
46+
"sharp": "^0.32.6",
47+
"totp-generator": "^0.0.14",
4648
"typescript": "^4.8.4",
4749
"validator": "^13.9.0"
4850
},
4951
"devDependencies": {
52+
"@types/totp-generator": "^0.0.5",
5053
"@types/lodash": "^4.14.191",
54+
"@types/luxon": "^3.3.0",
5155
"@types/node": "18.8.1",
5256
"@types/react": "18.0.21",
5357
"@types/validator": "^13.7.14",
@@ -63,9 +67,10 @@
6367
"eslint-plugin-node": "^11.1.0",
6468
"eslint-plugin-prettier": "^4.2.1",
6569
"eslint-plugin-react": "^7.32.2",
70+
"postcss": "^8.4.31",
6671
"prettier": "^2.7.1",
67-
"stylelint": "^14.13.0",
68-
"stylelint-config-sass-guidelines": "^9.0.1",
72+
"stylelint": "^15.10.1",
73+
"stylelint-config-sass-guidelines": "^10.0.0",
6974
"stylelint-order": "^5.0.0",
7075
"typed-scss-modules": "^7.0.2"
7176
}

0 commit comments

Comments
 (0)