Skip to content

Fix/prettier cost formatting - #1094

Merged
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
sadiqabubakar826-del:fix/prettier-cost-formatting
Jul 26, 2026
Merged

Fix/prettier cost formatting#1094
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
sadiqabubakar826-del:fix/prettier-cost-formatting

Conversation

@sadiqabubakar826-del

Copy link
Copy Markdown
Contributor

Summary

This PR contains two formatting-only fixes required by Prettier/ESLint that currently block CI:
Make the expect(...).toHaveBeenCalledWith(...) arguments multiline (prettier formatting) in src/monitoring/cost-scheduler.service.spec.ts
Expand an inline ternary used for metric labels into a multi-line object in src/monitoring/cost-tracking.service.ts
Why

The CI job fails on the lint step with prettier/prettier errors (auto-fixable). These changes align the code with the project's prettier rules so the lint step no longer fails and the rest of the pipeline can run.
Files changed

src/monitoring/cost-scheduler.service.spec.ts

Replace single-line expect call with a multiline call: expect(costService.recordHourlyCost).toHaveBeenCalledWith( result.amount, result.billingPeriod, );
src/monitoring/cost-tracking.service.ts

Replace the one-line ternary: const labels = billingPeriod ? { billing_period: billingPeriod } : { billing_period: 'unknown' };
With a multi-line form: const labels = billingPeriod ? { billing_period: billingPeriod, } : { billing_period: 'unknown', };
Testing steps (what I ran / what you should run)

pnpm install
pnpm run lint # eslint --fix will auto-fix many issues
pnpm run lint:ci # run CI lint check
pnpm run typecheck
pnpm run build
pnpm test --testPathPattern="monitoring"
Acceptance checklist

Lint (prettier) no longer fails on changed files
Typecheck passes
Build passes
Related tests pass locally
closes #1037

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit d645db1 into rinafcode:main Jul 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace the placeholder cloud billing figure in the cost monitoring scheduler

2 participants