Skip to content

Commit ba0de71

Browse files
committed
Merge remote-tracking branch 'origin/main' into Jay_Modify_Badge_Amount
Updating branch with dev branch
2 parents 0e1683e + 23c4978 commit ba0de71

1,295 files changed

Lines changed: 94076 additions & 53253 deletions

File tree

Some content is hidden

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

.babelrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"presets": ["react-app"],
2+
"presets": ["@babel/preset-env", "@babel/preset-react"],
33
"plugins": [
4-
"@babel/plugin-proposal-optional-chaining",
5-
"@babel/plugin-proposal-nullish-coalescing-operator"
4+
"@babel/plugin-transform-optional-chaining",
5+
"@babel/plugin-transform-nullish-coalescing-operator"
66
]
7-
}
7+
}

.eslintignore

Lines changed: 0 additions & 26 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 70 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222
- name: Setup Node.js
2323
uses: actions/setup-node@v4
2424
with:
25-
node-version: 14
26-
cache: 'npm'
25+
node-version: 20
26+
cache: 'yarn'
2727
- name: Install Dependencies
28-
run: npm ci
28+
run: yarn install --frozen-lockfile
2929
# We don't run tests here since we assume it's already done during PR process.
3030
# - name: Update Browser List
3131
# run: npx browserslist@latest --update-db
3232
- name: Build React App
33-
run: npm run build && cp build/index.html build/200.html
33+
run: yarn run build && cp build/index.html build/200.html
3434
env:
3535
NODE_ENV: ${{ github.ref_name == 'main' && 'production' || 'development' }}
3636
REACT_APP_APIENDPOINT: ${{ vars.REACT_APP_API_ENDPOINT }}

.github/workflows/pull_request_test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
fetch-depth: 0
1414
- uses: actions/setup-node@v4
1515
with:
16-
node-version: 14
17-
cache: 'npm'
16+
node-version: 20
17+
cache: 'yarn'
1818
- name: Install Dependencies
19-
run: npm ci
19+
run: yarn install --frozen-lockfile
2020
- name: Run Unit Tests for Changed Files Only
21-
run: npm run test:changed
21+
run: yarn run test:changed
2222
- name: Run Lint
23-
run: npm run lint
23+
run: yarn run lint

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test React App
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Node.js & cache Yarn
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: yarn
20+
21+
- name: Install dependencies
22+
run: yarn install
23+
24+
- name: Run tests
25+
run: yarn test
26+
27+
- name: Upload test results
28+
if: failure()
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: test-results
32+
path: test-results # Adjust the path to your test results if necessary

.husky-disabled/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run lint
5+
npm run test

.husky/pre-commit

100644100755
Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
33

4-
npm run lint
5-
npm run test
4+
echo ""
5+
echo "🛡️ Husky pre-commit hook triggered"
6+
echo "🛠️ Attempting to auto-fix lint issues (if possible)..."
7+
echo "🔍 Running ESLint via lint-staged on staged files:"
8+
git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx)$' || echo "No JS/TS files staged."
9+
10+
# Run lint-staged only if relevant files are staged
11+
if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx)$'; then
12+
npx lint-staged
13+
lint_exit_code=$?
14+
15+
if [ $lint_exit_code -eq 0 ]; then
16+
echo "✅ Lint passed or was auto-fixed. Proceeding with commit."
17+
else
18+
echo "❌ Lint failed. Some issues couldn't be auto-fixed. Commit aborted."
19+
echo "💡 Please fix the errors and try again."
20+
exit $lint_exit_code
21+
fi
22+
else
23+
echo "ℹ️ No JS/TS files to lint. Skipping lint-staged."
24+
fi

.husky/pre-push

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
echo "🧪 Running tests before push..."
5+
npm run test -- --bail=1
6+
test_status=$?
7+
8+
echo "🧹 Running lint before push..."
9+
npm run lint
10+
lint_status=$?
11+
12+
# Block push if either fails
13+
if [ $test_status -ne 0 ] || [ $lint_status -ne 0 ]; then
14+
echo "❌ Push blocked: Lint or test failed."
15+
exit 1
16+
fi
17+
18+
echo "✅ All checks passed. Proceeding with push..."

0 commit comments

Comments
 (0)