Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test:
cd idp_cli && python -m pytest -v

# Run both linting and formatting in one command
lint: ruff-lint format check-arn-partitions
lint: ruff-lint format check-arn-partitions ui-lint ui-build

# Run linting checks and fix issues automatically
ruff-lint:
Expand All @@ -38,7 +38,19 @@ lint-cicd:
echo -e "$(RED)ERROR: Code formatting check failed!$(NC)"; \
echo -e "$(YELLOW)Please run 'make format' locally to fix these issues.$(NC)"; \
exit 1; \
fi; \
echo "All checks passed!"
@echo "Frontend checks"
@if ! make ui-lint; then \
echo -e "$(RED)ERROR: UI lint failed$(NC)"; \
exit 1; \
fi

@if ! make ui-build; then \
echo -e "$(RED)ERROR: UI build failed$(NC)"; \
exit 1; \
fi

@echo -e "$(GREEN)All code quality checks passed!$(NC)"

# Check CloudFormation templates for hardcoded AWS partition ARNs and service principals
Expand Down Expand Up @@ -90,6 +102,14 @@ typecheck-pr:
python3 scripts/typecheck_pr_changes.py $(TARGET_BRANCH)


ui-lint:
@echo "Checking UI lint"
cd src/ui && npm ci --prefer-offline --no-audit && npm run lint

ui-build:
@echo "Checking UI build"
cd src/ui && npm ci --prefer-offline --no-audit && npm run build

commit: lint test
$(info Generating commit message...)
export COMMIT_MESSAGE="$(shell q chat --no-interactive --trust-all-tools "Understand pending local git change and changes to be committed, then infer a commit message. Return this commit message only" | tail -n 1 | sed 's/\x1b\[[0-9;]*m//g')" && \
Expand Down
2 changes: 1 addition & 1 deletion src/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"build": "npm run lint && vite build",
"preview": "vite preview",
"test": "vitest",
"lint": "npx eslint \"src/**/*.{js,jsx}\""
"lint": "eslint \"src/**/*.{js,jsx}\""
},
"eslintConfig": {
"extends": [
Expand Down