Skip to content

Commit 72d11d6

Browse files
authored
Merge branch 'development' into peterson-fix-button-disappears-after-page-reload
2 parents 9c45d8f + e018903 commit 72d11d6

2,146 files changed

Lines changed: 261803 additions & 99823 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+
}

.env.development

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Development environment settings
2+
REACT_APP_APIENDPOINT="http://localhost:4500/api"
3+
SKIP_PREFLIGHT_CHECK=true
4+
DISABLE_ESLINT_PLUGIN=true
5+
REACT_APP_DEF_PWD=123Welcome!

.eslintignore

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

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module.exports = {
5555
'jsx-a11y/label-has-associated-control': 'off',
5656
'jsx-a11y/no-static-element-interactions': 'off',
5757
'jsx-a11y/click-events-have-key-events': 'off',
58+
'jsx-a11y/control-has-associated-label': 'off',
5859
'no-alert': 'error',
5960
'no-console': 'error',
6061
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],

.eslintrc.json

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
1-
{
2-
"extends": [
3-
"airbnb",
4-
"prettier"
5-
],
6-
"plugins": [
7-
"prettier"
8-
],
9-
"rules": {
10-
"prettier/prettier": "error",
11-
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
12-
},
13-
"env": {
14-
"browser": true,
15-
"es2021": true
16-
},
17-
"parserOptions": {
18-
"ecmaFeatures": {
19-
"jsx": true
20-
},
21-
"ecmaVersion": 12,
22-
"sourceType": "module"
23-
}
24-
}
1+
{
2+
"rules": {
3+
"no-restricted-imports": [
4+
"error",
5+
{
6+
"patterns": ["*.css", "!*.module.css", "!index.css"]
7+
}
8+
]
9+
}
10+
}

.github/workflows/deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
concurrency:
88
group: Build and Deploy / ${{ github.ref_name == 'main' && 'Production' || 'Development' }}
99
cancel-in-progress: true
10-
jobs:
10+
jobs:
1111
# Build
1212
build:
1313
name: Build
@@ -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 }}
@@ -62,4 +62,4 @@ jobs:
6262
domain: ${{ vars.SURGE_DOMAIN }}
6363
project: './build'
6464
login: ${{ secrets.SURGE_LOGIN }}
65-
token: ${{ secrets.SURGE_TOKEN }}
65+
token: ${{ secrets.SURGE_TOKEN }}

.github/workflows/pull_request_test.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@ on:
55
branches:
66
- development
77
jobs:
8+
# CSS Enforcement
9+
css-check:
10+
name: Enforce CSS Modules
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Check for disallowed .css files in changed files
19+
run: |
20+
# Get list of changed CSS files in this PR
21+
changed_files=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD | grep '\.css$' || true)
22+
23+
if [ -z "$changed_files" ]; then
24+
echo "No CSS files changed in this PR"
25+
exit 0
26+
fi
27+
28+
echo "Changed CSS files:"
29+
echo "$changed_files"
30+
31+
# Check if any of the changed files are disallowed
32+
disallowed=$(echo "$changed_files" | grep -vE '(\.module\.css$|index\.css$)' || true)
33+
34+
if [ -n "$disallowed" ]; then
35+
echo "❌ Disallowed CSS file detected! Only '.module.css' (or 'index.css') files are permitted."
36+
echo "The following files violate the CSS Module policy:"
37+
echo "$disallowed"
38+
exit 1
39+
else
40+
echo "✅ CSS Module Enforcement Check passed - all changed CSS files are valid"
41+
fi
42+
843
test:
944
runs-on: ubuntu-latest
1045
steps:
@@ -13,11 +48,11 @@ jobs:
1348
fetch-depth: 0
1449
- uses: actions/setup-node@v4
1550
with:
16-
node-version: 14
17-
cache: 'npm'
51+
node-version: 20
52+
cache: 'yarn'
1853
- name: Install Dependencies
19-
run: npm ci
54+
run: yarn install --frozen-lockfile
2055
- name: Run Unit Tests for Changed Files Only
21-
run: npm run test:changed
56+
run: yarn run test:changed
2257
- name: Run Lint
23-
run: npm run lint
58+
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

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# dependencies
44
/node_modules
5+
package-lock.json
56
# testing
67
/coverage
78
*.code-snippets
@@ -10,19 +11,26 @@
1011

1112
# misc
1213
.DS_Store
14+
15+
# Environment files
1316
.env
1417
.env.local
18+
.env.development
1519
.env.development.local
1620
.env.test.local
1721
.env.production.local
1822

23+
24+
1925
npm-debug.log*
2026
yarn-debug.log*
2127
yarn-error.log*
2228
/.idea
2329

2430
.vscode/launch.json
31+
.vscode/settings.json
2532

2633
**\ **
2734

28-
/public/tinymce/
35+
/public/tinymce/
36+
package-lock.json

.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

0 commit comments

Comments
 (0)