Skip to content

Commit 80087bf

Browse files
fix: resolving the merge conflicts with the development branch
2 parents ccac7b6 + 9488fd4 commit 80087bf

93 files changed

Lines changed: 7117 additions & 19001 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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"rules": {
3+
"no-restricted-imports": [
4+
"error",
5+
{
6+
"patterns": [
7+
"*.css",
8+
"!*.module.css",
9+
"!index.css"
10+
]
11+
}
12+
]
13+
}
14+
}

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 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
@@ -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: 36 additions & 1 deletion
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:
@@ -20,4 +55,4 @@ jobs:
2055
- name: Run Unit Tests for Changed Files Only
2156
run: yarn run test:changed
2257
- name: Run Lint
23-
run: yarn run lint
58+
run: yarn run lint

.husky/pre-commit

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,25 @@
33

44
echo ""
55
echo "🛡️ Husky pre-commit hook triggered"
6+
7+
# Block plain .css files (except .module.css and index.css)
8+
for file in $(git diff --cached --name-only --diff-filter=ACM | grep '\.css$'); do
9+
case "$file" in
10+
*index.css) ;; # allow index.css
11+
*.module.css) ;; # allow module.css
12+
*)
13+
echo "$file is not allowed. Use .module.css instead."
14+
exit 1
15+
;;
16+
esac
17+
done
18+
619
echo "🛠️ Attempting to auto-fix lint issues (if possible)..."
720
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."
21+
git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx|css)$' || echo "No JS/TS/CSS files staged."
922

1023
# Run lint-staged only if relevant files are staged
11-
if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx)$'; then
24+
if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx|css)$'; then
1225
npx lint-staged
1326
lint_exit_code=$?
1427

@@ -20,5 +33,5 @@ if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx)$'; then
2033
exit $lint_exit_code
2134
fi
2235
else
23-
echo "ℹ️ No JS/TS files to lint. Skipping lint-staged."
36+
echo "ℹ️ No JS/TS/CSS files to lint. Skipping lint-staged."
2437
fi

.stylelintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"no-duplicate-selectors": true
4+
}
5+
}

0 commit comments

Comments
 (0)