Skip to content

Commit fcec86b

Browse files
Vinay VkVinay Vk
authored andcommitted
Made changes in the risk profile files and made them working in dark mode
2 parents 0faa624 + 6e71141 commit fcec86b

File tree

1,097 files changed

+134543
-29505
lines changed

Some content is hidden

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

1,097 files changed

+134543
-29505
lines changed

.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.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: 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/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: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,53 @@
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

4-
echo "🧪 Running tests before push..."
5-
npm run test -- --bail=1
6-
test_status=$?
12+
changed_files=$(git diff --name-only @{upstream}...HEAD 2>/dev/null)
13+
14+
if [ -z "$changed_files" ]; then
15+
echo "ℹ️ No outgoing changes to validate. Skipping pre-push checks."
16+
exit 0
17+
fi
18+
19+
if ! printf '%s\n' "$changed_files" | grep -qvE '^\.husky/'; then
20+
echo "ℹ️ Only Husky hook changes detected. Skipping full test and lint checks."
21+
exit 0
22+
fi
23+
24+
js_files=$(printf '%s\n' "$changed_files" | grep -E '\.(js|jsx|ts|tsx)$' || true)
25+
style_files=$(printf '%s\n' "$changed_files" | grep -E '\.(css|scss|sass)$' || true)
26+
27+
test_status=0
28+
lint_status=0
29+
style_status=0
30+
31+
if [ -n "$js_files" ]; then
32+
echo "🧪 Running related tests before push..."
33+
yarn vitest related --run $js_files
34+
test_status=$?
735

8-
echo "🧹 Running lint before push..."
9-
npm run lint
10-
lint_status=$?
36+
echo "🧹 Running ESLint on changed files before push..."
37+
yarn eslint $js_files
38+
lint_status=$?
39+
fi
40+
41+
if [ -n "$style_files" ]; then
42+
echo "🎨 Running Stylelint on changed files before push..."
43+
yarn stylelint $style_files
44+
style_status=$?
45+
fi
1146

1247
# Block push if either fails
13-
if [ $test_status -ne 0 ] || [ $lint_status -ne 0 ]; then
14-
echo "❌ Push blocked: Lint or test failed."
48+
if [ $test_status -ne 0 ] || [ $lint_status -ne 0 ] || [ $style_status -ne 0 ]; then
49+
echo "❌ Push blocked: changed-file validation failed."
1550
exit 1
1651
fi
1752

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

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)