phase 3.2 & 4.1

This commit is contained in:
Danilo Reyes
2025-11-02 00:36:32 -06:00
parent cac1db0ed7
commit d40139822d
21 changed files with 2230 additions and 123 deletions

View File

@@ -103,14 +103,18 @@
type = "app";
program = "${pkgs.writeShellScript "lint" ''
set -e
cd ${self}
# Backend Python linting
echo "🔍 Linting backend Python code..."
cd backend
${pkgs.ruff}/bin/ruff check --no-cache app/
${pkgs.ruff}/bin/ruff format --check app/
cd ..
if [ -d "backend" ]; then
cd backend
${pkgs.ruff}/bin/ruff check --no-cache app/
${pkgs.ruff}/bin/ruff format --check app/
cd ..
else
echo " Not in project root (backend/ not found)"
exit 1
fi
# Frontend linting (if node_modules exists)
if [ -d "frontend/node_modules" ]; then
@@ -118,7 +122,7 @@
echo "🔍 Linting frontend TypeScript/Svelte code..."
cd frontend
npm run lint
npx prettier --check src/
${pkgs.nodePackages.prettier}/bin/prettier --check src/
npm run check
cd ..
else
@@ -135,19 +139,23 @@
type = "app";
program = "${pkgs.writeShellScript "lint-fix" ''
set -e
cd ${self}
echo "🔧 Auto-fixing backend Python code..."
cd backend
${pkgs.ruff}/bin/ruff check --fix --no-cache app/
${pkgs.ruff}/bin/ruff format app/
cd ..
if [ -d "backend" ]; then
cd backend
${pkgs.ruff}/bin/ruff check --fix --no-cache app/ || true
${pkgs.ruff}/bin/ruff format app/
cd ..
else
echo " Not in project root (backend/ not found)"
exit 1
fi
if [ -d "frontend/node_modules" ]; then
echo ""
echo "🔧 Auto-fixing frontend code..."
cd frontend
npx prettier --write src/
${pkgs.nodePackages.prettier}/bin/prettier --write src/
cd ..
fi