Skip to content

Commit b8f405e

Browse files
authored
Merge branch 'development' into Akshith-radiobox-checkbox-alignment
2 parents e1f48aa + 2901ee9 commit b8f405e

1,057 files changed

Lines changed: 130632 additions & 34493 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.

.eslintrc.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
"no-restricted-imports": [
44
"error",
55
{
6-
"patterns": [
7-
"*.css",
8-
"!*.module.css",
9-
"!index.css"
10-
]
6+
"patterns": ["*.css", "!*.module.css", "!index.css"]
117
}
128
]
139
}
14-
}
10+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ yarn-error.log*
2727
/.idea
2828

2929
.vscode/launch.json
30+
.vscode/settings.json
3031

3132
**\ **
3233

.husky-disabled/pre-commit

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

.husky/pre-commit

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.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
39

410
echo ""
511
echo "🛡️ Husky pre-commit hook triggered"
612

13+
if git rev-parse -q --verify MERGE_HEAD >/dev/null 2>&1; then
14+
echo "ℹ️ Merge commit detected. Skipping lint-staged auto-fix on the merged file set."
15+
exit 0
16+
fi
17+
718
# Block plain .css files (except .module.css and index.css)
819
for file in $(git diff --cached --name-only --diff-filter=ACM | grep '\.css$'); do
920
case "$file" in
@@ -34,4 +45,4 @@ if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx|css)$'; then
3445
fi
3546
else
3647
echo "ℹ️ No JS/TS/CSS files to lint. Skipping lint-staged."
37-
fi
48+
fi

.husky/pre-push

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,57 @@
11
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.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 command -v nvm >/dev/null 2>&1 && [ -f .nvmrc ]; then
7+
nvm use 20 2>/dev/null || nvm install 20 && nvm use 20
8+
fi
9+
10+
if git rev-parse --abbrev-ref @{upstream} >/dev/null 2>&1; then
11+
changed_files=$(git diff --name-only @{upstream}...HEAD)
12+
else
13+
echo "ℹ️ No upstream branch set. Skipping pre-push checks."
14+
exit 0
15+
fi
16+
17+
if [ -z "$changed_files" ]; then
18+
echo "ℹ️ No outgoing changes to validate. Skipping pre-push checks."
19+
exit 0
20+
fi
21+
22+
if ! printf '%s\n' "$changed_files" | grep -qvE '^\.husky/'; then
23+
echo "ℹ️ Only Husky hook changes detected. Skipping full test and lint checks."
24+
exit 0
25+
fi
326

4-
echo "🧪 Running tests before push..."
5-
npm run test -- --bail=1
6-
test_status=$?
27+
js_files=$(printf '%s\n' "$changed_files" | grep -E '\.(js|jsx|ts|tsx)$' || true)
28+
style_files=$(printf '%s\n' "$changed_files" | grep -E '\.(css|scss|sass)$' || true)
29+
30+
test_status=0
31+
lint_status=0
32+
style_status=0
33+
34+
if [ -n "$js_files" ]; then
35+
echo "🧪 Running related tests before push..."
36+
echo "$js_files" | tr ' ' '\n' | xargs npx vitest related --run
37+
test_status=$?
38+
39+
echo "🧹 Running ESLint on changed files before push..."
40+
echo "$js_files" | tr ' ' '\n' | xargs npx eslint
41+
lint_status=$?
42+
fi
43+
44+
if [ -n "$style_files" ]; then
45+
echo "🎨 Running Stylelint on changed files before push..."
46+
echo "$style_files" | tr ' ' '\n' | xargs npx stylelint
47+
style_status=$?
48+
fi
749

8-
echo "🧹 Running lint before push..."
9-
npm run lint
10-
lint_status=$?
1150

1251
# Block push if either fails
13-
if [ $test_status -ne 0 ] || [ $lint_status -ne 0 ]; then
14-
echo "❌ Push blocked: Lint or test failed."
52+
if [ $test_status -ne 0 ] || [ $lint_status -ne 0 ] || [ $style_status -ne 0 ]; then
53+
echo "❌ Push blocked: changed-file validation failed."
1554
exit 1
1655
fi
1756

18-
echo "✅ All checks passed. Proceeding with push..."
57+
echo "✅ All checks passed. Proceeding with 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/

.stylelintrc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
{
2+
"extends": ["stylelint-config-standard"],
3+
"ignoreFiles": [
4+
"build/**/*.css",
5+
"public/**/*.css",
6+
"node_modules/**/*.css"
7+
],
28
"rules": {
3-
"no-duplicate-selectors": true
9+
"no-duplicate-selectors": true,
10+
"selector-pseudo-class-no-unknown": [
11+
true,
12+
{ "ignorePseudoClasses": ["global", "local"] }
13+
],
14+
"selector-class-pattern": null,
15+
"selector-id-pattern": null
416
}
5-
}
17+
}

.yarnrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Avoid stale persisted package tarballs in CI/Netlify.
2+
cache-folder "/tmp/hgn-yarn-cache"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Define a imagem base
2-
FROM node:14-alpine
2+
FROM node:20-alpine
33
# Set the working directory to /app
44
WORKDIR /app
55
# Copy the package.json and yarn.lock files to the container

0 commit comments

Comments
 (0)