Skip to content

Commit 792251d

Browse files
author
Test
committed
Merge origin/development into veda-job-specific-template-changes
- Take Collaboration.jsx and yarn.lock from development - Remove legacy Collaboration.css; keep rest of branch changes Made-with: Cursor
2 parents 3b5a74f + 8bdd4dd commit 792251d

1,196 files changed

Lines changed: 143217 additions & 31431 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.

.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!

.eslintrc.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
module.exports = {
2+
ignorePatterns: ['**/*.css'],
3+
env: {
4+
browser: true,
5+
es6: true,
6+
node: true,
7+
},
8+
settings: {
9+
react: {
10+
version: 'detect',
11+
},
12+
'import/resolver': {
13+
node: {
14+
paths: ['src'],
15+
extensions: ['.js', '.jsx'],
16+
},
17+
},
18+
},
19+
extends: [
20+
'airbnb',
21+
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
22+
'plugin:react-hooks/recommended',
23+
'plugin:react/jsx-runtime',
24+
'plugin:import/recommended',
25+
'prettier/react',
26+
'plugin:prettier/recommended', // use prettier as a eslint rule
27+
],
28+
globals: {
29+
Atomics: 'readonly',
30+
SharedArrayBuffer: 'readonly',
31+
},
32+
parser: 'babel-eslint',
33+
parserOptions: {
34+
ecmaFeatures: {
35+
jsx: true,
36+
},
37+
ecmaVersion: 2018,
38+
sourceType: 'module',
39+
},
40+
plugins: ['react', 'testing-library', 'prettier'],
41+
rules: {
42+
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
43+
'no-underscore-dangle': 'off',
44+
'react/prop-types': 'off',
45+
'react-hooks/exhaustive-deps': 'off',
46+
'react/jsx-key': 'off',
47+
'react/jsx-uses-react': 'off',
48+
'react/display-name': 'off',
49+
'react/no-direct-mutation-state': 'off',
50+
'react/no-unknown-property': 'off',
51+
'react/destructuring-assignment': 'off',
52+
'react/react-in-jsx-scope': 'off',
53+
'import/no-duplicates': 'off',
54+
'import/no-named-as-default': 'off',
55+
'jsx-a11y/label-has-associated-control': 'off',
56+
'jsx-a11y/no-static-element-interactions': 'off',
57+
'jsx-a11y/click-events-have-key-events': 'off',
58+
'jsx-a11y/control-has-associated-label': 'off',
59+
'no-alert': 'error',
60+
'no-console': 'error',
61+
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
62+
},
63+
overrides: [
64+
{
65+
files: ['**/*.test.js', '**/*.test.jsx'],
66+
env: {
67+
jest: true,
68+
},
69+
},
70+
],
71+
};

.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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: 1 addition & 1 deletion
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

.github/workflows/pull_request_test.yml

Lines changed: 35 additions & 0 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:

.gitignore

Lines changed: 7 additions & 0 deletions
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,18 +11,24 @@
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

.husky/pre-commit

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
#!/bin/sh
2+
# Load nvm if available
3+
export NVM_DIR="$HOME/.nvm"
4+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
5+
# Use Node 20 if available (or install if needed)
6+
if [ -f .nvmrc ]; then
7+
nvm use 20 2>/dev/null || nvm install 20 && nvm use 20
8+
fi
9+
210
. "$(dirname "$0")/_/husky.sh"
311

412
echo ""
513
echo "🛡️ Husky pre-commit hook triggered"
14+
15+
# Block plain .css files (except .module.css and index.css)
16+
for file in $(git diff --cached --name-only --diff-filter=ACM | grep '\.css$'); do
17+
case "$file" in
18+
*index.css) ;; # allow index.css
19+
*.module.css) ;; # allow module.css
20+
*)
21+
echo "$file is not allowed. Use .module.css instead."
22+
exit 1
23+
;;
24+
esac
25+
done
26+
627
echo "🛠️ Attempting to auto-fix lint issues (if possible)..."
728
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."
29+
git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx|css)$' || echo "No JS/TS/CSS files staged."
930

1031
# Run lint-staged only if relevant files are staged
11-
if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx)$'; then
32+
if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx|css)$'; then
1233
npx lint-staged
1334
lint_exit_code=$?
1435

@@ -20,5 +41,5 @@ if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx)$'; then
2041
exit $lint_exit_code
2142
fi
2243
else
23-
echo "ℹ️ No JS/TS files to lint. Skipping lint-staged."
44+
echo "ℹ️ No JS/TS/CSS files to lint. Skipping lint-staged."
2445
fi

.husky/pre-push

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/sh
2+
# Load nvm if available
3+
export NVM_DIR="$HOME/.nvm"
4+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
5+
# Use Node 20 if available (or install if needed)
6+
if [ -f .nvmrc ]; then
7+
nvm use 20 2>/dev/null || nvm install 20 && nvm use 20
8+
fi
9+
210
. "$(dirname "$0")/_/husky.sh"
311

412
echo "🧪 Running tests before push..."

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
*.png
22
*.svg
33
src/actions/**
4-
src/App.css
54
src/config.json
65

76
src/languages/**

.stylelintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public/
2+
node_modules/
3+
dist/
4+
build/
5+
coverage/

0 commit comments

Comments
 (0)