Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .env.development

This file was deleted.

71 changes: 0 additions & 71 deletions .eslintrc.js

This file was deleted.

14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
concurrency:
group: Build and Deploy / ${{ github.ref_name == 'main' && 'Production' || 'Development' }}
cancel-in-progress: true
jobs:
jobs:
# Build
build:
name: Build
Expand Down Expand Up @@ -62,4 +62,4 @@ jobs:
domain: ${{ vars.SURGE_DOMAIN }}
project: './build'
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
token: ${{ secrets.SURGE_TOKEN }}
37 changes: 1 addition & 36 deletions .github/workflows/pull_request_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,6 @@ on:
branches:
- development
jobs:
# CSS Enforcement
css-check:
name: Enforce CSS Modules
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for disallowed .css files in changed files
run: |
# Get list of changed CSS files in this PR
changed_files=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD | grep '\.css$' || true)

if [ -z "$changed_files" ]; then
echo "No CSS files changed in this PR"
exit 0
fi

echo "Changed CSS files:"
echo "$changed_files"

# Check if any of the changed files are disallowed
disallowed=$(echo "$changed_files" | grep -vE '(\.module\.css$|index\.css$)' || true)

if [ -n "$disallowed" ]; then
echo "❌ Disallowed CSS file detected! Only '.module.css' (or 'index.css') files are permitted."
echo "The following files violate the CSS Module policy:"
echo "$disallowed"
exit 1
else
echo "✅ CSS Module Enforcement Check passed - all changed CSS files are valid"
fi

test:
runs-on: ubuntu-latest
steps:
Expand All @@ -55,4 +20,4 @@ jobs:
- name: Run Unit Tests for Changed Files Only
run: yarn run test:changed
- name: Run Lint
run: yarn run lint
run: yarn run lint
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@

# misc
.DS_Store

# Environment files
.env
.env.local
.env.development
.env.development.local
.env.test.local
.env.production.local



npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
19 changes: 3 additions & 16 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,12 @@

echo ""
echo "🛡️ Husky pre-commit hook triggered"

# Block plain .css files (except .module.css and index.css)
for file in $(git diff --cached --name-only --diff-filter=ACM | grep '\.css$'); do
case "$file" in
*index.css) ;; # allow index.css
*.module.css) ;; # allow module.css
*)
echo "❌ $file is not allowed. Use .module.css instead."
exit 1
;;
esac
done

echo "🛠️ Attempting to auto-fix lint issues (if possible)..."
echo "🔍 Running ESLint via lint-staged on staged files:"
git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx|css)$' || echo "No JS/TS/CSS files staged."
git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx)$' || echo "No JS/TS files staged."

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

Expand All @@ -33,5 +20,5 @@ if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx|css)$'; then
exit $lint_exit_code
fi
else
echo "ℹ️ No JS/TS/CSS files to lint. Skipping lint-staged."
echo "ℹ️ No JS/TS files to lint. Skipping lint-staged."
fi
5 changes: 0 additions & 5 deletions .stylelintrc

This file was deleted.

1 change: 0 additions & 1 deletion current-sonarqube-issues.json

This file was deleted.

10 changes: 10 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ module.exports = [
'node_modules/**',
'public/**',
'build/**',
// Ignore test files inside /src/components
'src/components/BMDashboard/_tests_/BMDashboard.test.jsx',
'src/components/Reports/PeopleReport/components/PeopleTasksPieChart.test.jsx',
// Ignore entire component folders
'src/components/Badge/**',
'src/components/SummaryManagement/**',
'src/components/TeamMemberTasks/**',
'src/components/Teams/TeamMembersPopup.jsx',
'src/components/UserProfile/**',
'src/components/Announcements/index.jsx',
],
},

Expand Down
1 change: 0 additions & 1 deletion final-sonarqube-issues.json

This file was deleted.

9 changes: 2 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {

// Bundle mapper for d3 import and other custom mocks
moduleNameMapper: {
'^d3$': '<rootDir>/src/__mocks__/d3.js',
d3: '<rootDir>/node_modules/d3/dist/d3.min.js',
'react-leaflet': '<rootDir>/src/_tests_/__mocks__/react-leaflet.js',
'marker-cluster-group': '<rootDir>/src/_tests_/__mocks__/react-leaflet-cluster.js',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', // <-- Added to mock CSS/SCSS files
Expand All @@ -38,12 +38,7 @@ module.exports = {
testURL: 'http://localhost',

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: [
'/node_modules/(?!d3|d3-[^/]+|internmap|delaunator|robust-predicates)/',
],
transform: {
'^.+\\.[jt]sx?$': 'babel-jest',
},
transformIgnorePatterns: ['/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)'],

// Indicates whether each individual test should be reported during the run
verbose: false,
Expand Down
1 change: 0 additions & 1 deletion latest-sonarqube-issues.json

This file was deleted.

Loading
Loading