-
Notifications
You must be signed in to change notification settings - Fork 27
feat: Add linting checks to CI/CD and fix code style issues #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@marcelorodrigo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 5 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdds ESLint flat-config and CI linting, updates Nuxt configuration and metadata, applies widespread formatting/type tweaks across components and utilities, removes .editorconfig, and introduces a new ES module script (update-indexes.mjs) to fetch and persist financial indicators. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Updater as update-indexes.mjs
participant API1 as Poupanca API
participant API2 as DI API
participant API3 as Selic API
participant FS as indicadores.json (filesystem)
rect rgb(230,245,255)
Note over Updater,API1: Start sequential fetch & validation
end
Updater->>API1: fetchPoupanca()
API1-->>Updater: poupancaValue (or null)
Updater->>API2: fetchDi()
API2-->>Updater: diValue (sum)
Updater->>API3: fetchSelic()
API3-->>Updater: selicValue
rect rgb(235,255,235)
Note over Updater,FS: Validate values, update indicadores object
end
Updater->>FS: write updated indicadores.json
FS-->>Updater: write confirmation
Note over Updater: log completion / errors
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # app/components/investment/AmountInput.vue # app/pages/index.vue
…ult, and index components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/components/InvestmentResult.vue (1)
190-191: Potential NaN wheniofAmountis null.
props.iofAmountdefaults tonull(line 177), but it's used directly in arithmetic on line 190 without null coalescing. This will produceNaNwheniofAmountis null.🔎 Proposed fix: Apply consistent null handling
-const totalProfit = computed(() => props.interestAmount - props.iofAmount - (props.taxAmount ?? 0)) +const totalProfit = computed(() => props.interestAmount - (props.iofAmount ?? 0) - (props.taxAmount ?? 0))
🧹 Nitpick comments (5)
test/unit/src/cdb.spec.ts (1)
51-67: Consider adding IOF boundary edge case tests at day 30 and 31.Per coding guidelines, IOF edge cases should verify that IOF becomes 0 after day 30. The current test uses 200 days but misses the exact boundary. Consider adding tests for:
- Day 30: last day in the IOF table (should return 0% per table)
- Day 31: first day past the table boundary (should return 0)
Based on learnings, critical financial calculations including IOF edge cases must be tested exhaustively.
Would you like me to generate test cases for these IOF boundary conditions?
app/components/InvestmentResult.vue (1)
186-187: Consider removing unusedhasAmountcomputed property.The
hasAmountvariable is defined but never used, requiring an ESLint disable comment. If it's not needed, removing it would be cleaner than suppressing the warning.🔎 Proposed fix
-// eslint-disable-next-line @typescript-eslint/no-unused-vars -const hasAmount = computed(() => !!props.amount)app/components/InvestmentInput.vue (1)
7-8: Consider using~alias for consistency.Lines 2-6 use the
~alias for imports from~/components/investment/, but lines 7-8 use relative paths (./investment/). As per coding guidelines, the~alias should be used for referencing theapp/directory in imports.🔎 Proposed fix
-import PeriodInput from './investment/PeriodInput.vue' -import PeriodTypeInput from './investment/PeriodTypeInput.vue' +import PeriodInput from '~/components/investment/PeriodInput.vue' +import PeriodTypeInput from '~/components/investment/PeriodTypeInput.vue'Based on coding guidelines: "Use the
~alias to reference theapp/directory in imports".package.json (1)
24-24: Consider using@stylistic/eslint-plugininstead of the deprecatedeslint-stylisticpackage.The
eslint-stylisticpackage (version 0.0.0-0) is the only published version and has had no updates since September 2023. The modern, actively maintained equivalent is@stylistic/eslint-plugin(latest version 5.3.1) and related scoped packages (@stylistic/eslint-plugin-js,@stylistic/eslint-plugin-ts, etc.). Using an unmaintained package with a pre-release version may cause long-term maintenance and compatibility issues.app/components/investment/IndexCdbInput.vue (1)
52-56: Consider removing unusedrulesobject or integrating it.The
rulesobject is explicitly marked as unused with an ESLint disable comment, and its validation logic is duplicated in theisValidanderrorMessagecomputed properties (lines 63-78). This is dead code.Consider either:
- Removing the
rulesobject entirely, or- Refactoring to use
rulesin the computed properties to avoid duplicationOption 1: Remove unused rules
-// eslint-disable-next-line @typescript-eslint/no-unused-vars -const rules = { - required: (value: unknown) => !!value || 'Obrigatório', - positive: (value: unknown) => parseInt(value as string) > 0 || 'Deve ser um número positivo', -} -Option 2: Use rules in validation
const rules = { required: (value: unknown) => !!value || 'Obrigatório', positive: (value: unknown) => parseInt(value as string) > 0 || 'Deve ser um número positivo', } -const isValid = computed(() => { - if (!cdb.value) { - return false - } - return Number(cdb.value) > 0 -}) +const isValid = computed(() => { + return rules.required(cdb.value) === true && rules.positive(cdb.value) === true +}) -const errorMessage = computed(() => { - if (!cdb.value) { - return 'Obrigatório' - } - if (Number(cdb.value) <= 0) { - return 'Deve ser um número positivo' - } - return '' -}) +const errorMessage = computed(() => { + const requiredResult = rules.required(cdb.value) + if (requiredResult !== true) return requiredResult + const positiveResult = rules.positive(cdb.value) + if (positiveResult !== true) return positiveResult + return '' +})
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (31)
.editorconfig.github/copilot-instructions.md.github/workflows/ci.yml.github/workflows/publish.ymlapp/components/InvestmentInput.vueapp/components/InvestmentResult.vueapp/components/InvestmentSimulation.vueapp/components/NavigationBar.vueapp/components/investment/AmountInput.vueapp/components/investment/IndexCdbInput.vueapp/components/investment/IndexDiInput.vueapp/components/investment/IndexLcxInput.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/PeriodInput.vueapp/components/investment/PeriodTypeInput.vueapp/layouts/default.vueapp/pages/como-calcular-juros-da-poupanca.vueapp/pages/index.vueapp/pages/sobre.vueapp/src/cdb.tsapp/src/finance.tsapp/src/lcx.tsapp/src/poupanca.tsapp/store/investment.tseslint.config.mjsnuxt.config.tspackage.jsontest/nuxt/AmountInput.test.tstest/unit/src/cdb.spec.tstest/unit/src/finance.spec.tsupdate-indexes.js
💤 Files with no reviewable changes (2)
- .editorconfig
- test/nuxt/AmountInput.test.ts
🧰 Additional context used
📓 Path-based instructions (19)
app/{src/**,store/**}.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
app/{src/**,store/**}.ts: Use period multiplier constants to convert user inputs: Days = 1, Months = 365/12, Years = 365 (not 30, 360, or other values)
Period conversion must account for 1 month = 365/12 days and 1 year = 365 days, not 30 or 360 days
Files:
app/store/investment.tsapp/src/lcx.tsapp/src/finance.tsapp/src/poupanca.tsapp/src/cdb.ts
app/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use the
~alias to reference theapp/directory in imports
Files:
app/store/investment.tsapp/src/lcx.tsapp/components/InvestmentSimulation.vueapp/components/investment/IndexCdbInput.vueapp/pages/sobre.vueapp/components/InvestmentInput.vueapp/components/investment/PeriodTypeInput.vueapp/src/finance.tsapp/components/NavigationBar.vueapp/src/poupanca.tsapp/pages/index.vueapp/components/investment/AmountInput.vueapp/pages/como-calcular-juros-da-poupanca.vueapp/layouts/default.vueapp/src/cdb.tsapp/components/investment/IndexLcxInput.vueapp/components/InvestmentResult.vueapp/components/investment/PeriodInput.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/IndexDiInput.vue
app/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use TypeScript strict mode as configured in tsconfig.json
Files:
app/store/investment.tsapp/src/lcx.tsapp/src/finance.tsapp/src/poupanca.tsapp/src/cdb.ts
app/{components/**,store/**}.{vue,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use Portuguese terminology in UI and state management for investment periods:
PeriodTypes.Dias,meses,anos
Files:
app/store/investment.tsapp/components/InvestmentSimulation.vueapp/components/InvestmentInput.vueapp/components/NavigationBar.vueapp/components/InvestmentResult.vue
app/src/{cdb,lcx,poupanca}.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Calculation functions should follow the pattern
get<Type>Result()and return an object with properties:interestAmount,taxAmount,taxPercentage,iofAmount
Files:
app/src/lcx.tsapp/src/poupanca.tsapp/src/cdb.ts
app/src/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use
.toFixed(2)for all currency calculations to ensure precision in financial results
Files:
app/src/lcx.tsapp/src/finance.tsapp/src/poupanca.tsapp/src/cdb.ts
app/src/{cdb,lcx}.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
CDB/RDB investments require both IR tax and IOF penalty calculations; LCI/LCA are tax-exempt with no IR/IOF
Files:
app/src/lcx.tsapp/src/cdb.ts
app/components/**/InvestmentSimulation.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Computed properties in
InvestmentSimulation.vueshould recalculate results whenever Pinia store values change
Files:
app/components/InvestmentSimulation.vue
app/components/**/*.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Results display components should read from Pinia store and reflect calculated values
Files:
app/components/InvestmentSimulation.vueapp/components/investment/IndexCdbInput.vueapp/components/InvestmentInput.vueapp/components/investment/PeriodTypeInput.vueapp/components/NavigationBar.vueapp/components/investment/AmountInput.vueapp/components/investment/IndexLcxInput.vueapp/components/InvestmentResult.vueapp/components/investment/PeriodInput.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/IndexDiInput.vue
test/unit/src/{finance,cdb,lcx,poupanca}.spec.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Critical financial calculations (tax tables, compound interest formulas, IOF edge cases) must be tested exhaustively with Vitest
Files:
test/unit/src/finance.spec.tstest/unit/src/cdb.spec.ts
test/unit/src/{finance,cdb}.spec.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Verify IOF edge cases in tests, specifically that IOF becomes 0 after day 30 and lookup table bounds are correctly handled
Files:
test/unit/src/finance.spec.tstest/unit/src/cdb.spec.ts
app/components/investment/**/*.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Input components should be organized in the
app/components/investment/directory
Files:
app/components/investment/IndexCdbInput.vueapp/components/investment/PeriodTypeInput.vueapp/components/investment/AmountInput.vueapp/components/investment/IndexLcxInput.vueapp/components/investment/PeriodInput.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/IndexDiInput.vue
app/src/finance.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
IR (Income Tax) calculation must use day-based brackets: ≤180 days = 22.5%, 181-360 days = 20%, 361-720 days = 17.5%, >720 days = 15%
Files:
app/src/finance.ts
app/src/{finance,cdb}.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
IOF (Insurance Ops Tax) should only apply to investments redeemed before day 30 and must use the lookup table
iofTable[]defined in finance.ts
Files:
app/src/finance.tsapp/src/cdb.ts
app/src/poupanca.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Savings account calculations use simple monthly rates without tax calculations
Files:
app/src/poupanca.ts
app/pages/index.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Pinia store should be initialized in the index.vue page using
store.initializeStore()
Files:
app/pages/index.vue
{update-indexes.js,app/assets/indicadores.json}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Update market indices by running
update-indexes.jswhich fetches data from BCB API endpoints and updatesapp/assets/indicadores.json
Files:
update-indexes.js
update-indexes.js
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Integration with BCB API requires the correct series IDs: 4391 for DI, 1 month average for SELIC, and other specific series as defined in update-indexes.js
Files:
update-indexes.js
app/layouts/default.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use
app/layouts/default.vuefor consistent header and footer across all pages
Files:
app/layouts/default.vue
🧠 Learnings (20)
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to test/unit/src/{finance,cdb,lcx,poupanca}.spec.ts : Critical financial calculations (tax tables, compound interest formulas, IOF edge cases) must be tested exhaustively with Vitest
Applied to files:
.github/copilot-instructions.mdapp/src/lcx.tstest/unit/src/finance.spec.tsapp/src/finance.tsapp/src/poupanca.tstest/unit/src/cdb.spec.tsapp/src/cdb.ts
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/components/**/*.vue : Results display components should read from Pinia store and reflect calculated values
Applied to files:
.github/copilot-instructions.mdapp/components/InvestmentSimulation.vueapp/components/investment/PeriodTypeInput.vueapp/pages/index.vueapp/components/InvestmentResult.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/pages/index.vue : Pinia store should be initialized in the index.vue page using `store.initializeStore()`
Applied to files:
.github/copilot-instructions.mdapp/pages/index.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Always run `pnpm update-indexes` before commits to keep `app/assets/indicadores.json` current with latest BCB API data
Applied to files:
.github/copilot-instructions.mdupdate-indexes.js
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/{components/**,store/**}.{vue,ts} : Use Portuguese terminology in UI and state management for investment periods: `PeriodTypes.Dias`, `meses`, `anos`
Applied to files:
app/store/investment.tsapp/components/InvestmentSimulation.vueapp/components/investment/IndexCdbInput.vueapp/components/InvestmentInput.vueapp/components/investment/PeriodTypeInput.vueapp/src/finance.tsapp/src/poupanca.tsapp/pages/index.vueapp/components/investment/AmountInput.vueupdate-indexes.jsapp/pages/como-calcular-juros-da-poupanca.vueapp/components/investment/IndexLcxInput.vueapp/components/InvestmentResult.vueapp/components/investment/PeriodInput.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/IndexDiInput.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/{src/**,store/**}.ts : Use period multiplier constants to convert user inputs: Days = 1, Months = 365/12, Years = 365 (not 30, 360, or other values)
Applied to files:
app/store/investment.tsapp/src/lcx.tsapp/components/InvestmentSimulation.vuetest/unit/src/finance.spec.tsapp/components/investment/PeriodTypeInput.vueapp/src/finance.tsapp/src/poupanca.tsapp/src/cdb.tsapp/components/investment/PeriodInput.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/src/{cdb,lcx,poupanca}.ts : Calculation functions should follow the pattern `get<Type>Result()` and return an object with properties: `interestAmount`, `taxAmount`, `taxPercentage`, `iofAmount`
Applied to files:
app/store/investment.tsapp/src/lcx.tsapp/components/InvestmentSimulation.vuetest/unit/src/finance.spec.tsapp/components/investment/IndexCdbInput.vueapp/src/finance.tsapp/src/poupanca.tsapp/pages/index.vueapp/components/investment/AmountInput.vueupdate-indexes.jsapp/pages/como-calcular-juros-da-poupanca.vueapp/src/cdb.tsapp/components/InvestmentResult.vueapp/components/investment/IndexSelicInput.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/src/poupanca.ts : Savings account calculations use simple monthly rates without tax calculations
Applied to files:
app/store/investment.tsapp/src/lcx.tsapp/components/InvestmentSimulation.vuetest/unit/src/finance.spec.tsapp/src/finance.tsapp/src/poupanca.tsapp/pages/index.vueapp/pages/como-calcular-juros-da-poupanca.vueapp/src/cdb.tsapp/components/InvestmentResult.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/IndexDiInput.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/{src/**,store/**}.ts : Period conversion must account for 1 month = 365/12 days and 1 year = 365 days, not 30 or 360 days
Applied to files:
app/store/investment.tsapp/src/lcx.tsapp/components/investment/PeriodTypeInput.vueapp/src/finance.tsapp/src/poupanca.tstest/unit/src/cdb.spec.ts
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/src/{cdb,lcx}.ts : CDB/RDB investments require both IR tax and IOF penalty calculations; LCI/LCA are tax-exempt with no IR/IOF
Applied to files:
app/store/investment.tsapp/src/lcx.tsapp/components/InvestmentSimulation.vuetest/unit/src/finance.spec.tsapp/components/investment/IndexCdbInput.vueapp/src/finance.tsapp/src/poupanca.tsapp/pages/index.vueapp/src/cdb.ts
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/components/**/InvestmentSimulation.vue : Computed properties in `InvestmentSimulation.vue` should recalculate results whenever Pinia store values change
Applied to files:
app/store/investment.tsapp/components/InvestmentSimulation.vueapp/components/investment/IndexCdbInput.vueapp/components/investment/PeriodTypeInput.vueapp/components/investment/AmountInput.vueapp/components/investment/IndexLcxInput.vueapp/components/InvestmentResult.vueapp/components/investment/PeriodInput.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/IndexDiInput.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/src/{finance,cdb}.ts : IOF (Insurance Ops Tax) should only apply to investments redeemed before day 30 and must use the lookup table `iofTable[]` defined in finance.ts
Applied to files:
app/store/investment.tsapp/src/lcx.tstest/unit/src/finance.spec.tsapp/src/finance.tsapp/src/poupanca.tsapp/src/cdb.ts
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/src/finance.ts : IR (Income Tax) calculation must use day-based brackets: ≤180 days = 22.5%, 181-360 days = 20%, 361-720 days = 17.5%, >720 days = 15%
Applied to files:
app/store/investment.tsapp/src/lcx.tsapp/components/InvestmentSimulation.vuetest/unit/src/finance.spec.tsapp/src/finance.tsapp/src/poupanca.tsapp/src/cdb.ts
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to update-indexes.js : Integration with BCB API requires the correct series IDs: 4391 for DI, 1 month average for SELIC, and other specific series as defined in update-indexes.js
Applied to files:
app/store/investment.tsupdate-indexes.js
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to test/unit/src/{finance,cdb}.spec.ts : Verify IOF edge cases in tests, specifically that IOF becomes 0 after day 30 and lookup table bounds are correctly handled
Applied to files:
app/src/lcx.tstest/unit/src/finance.spec.tsapp/src/finance.tsapp/src/poupanca.tstest/unit/src/cdb.spec.tsapp/src/cdb.ts
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/components/investment/**/*.vue : Input components should be organized in the `app/components/investment/` directory
Applied to files:
app/components/InvestmentSimulation.vueapp/components/investment/IndexCdbInput.vueapp/components/InvestmentInput.vueapp/components/investment/PeriodTypeInput.vueapp/pages/index.vueapp/components/investment/AmountInput.vueapp/components/investment/IndexLcxInput.vueapp/components/InvestmentResult.vueapp/components/investment/PeriodInput.vueapp/components/investment/IndexSelicInput.vueapp/components/investment/IndexDiInput.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/src/*.ts : Use `.toFixed(2)` for all currency calculations to ensure precision in financial results
Applied to files:
test/unit/src/finance.spec.tsapp/src/finance.tsapp/components/InvestmentResult.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/layouts/default.vue : Use `app/layouts/default.vue` for consistent header and footer across all pages
Applied to files:
app/pages/index.vueapp/layouts/default.vueapp/components/InvestmentResult.vue
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to {update-indexes.js,app/assets/indicadores.json} : Update market indices by running `update-indexes.js` which fetches data from BCB API endpoints and updates `app/assets/indicadores.json`
Applied to files:
update-indexes.js
📚 Learning: 2025-12-10T20:24:28.438Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T20:24:28.438Z
Learning: Applies to app/assets/indicadores.json : Do not commit hardcoded values to `app/assets/indicadores.json`; always fetch from the BCB API
Applied to files:
update-indexes.js
🧬 Code graph analysis (1)
test/unit/src/finance.spec.ts (1)
app/src/finance.ts (2)
getIndexIR(6-19)compoundInterest(1-4)
🪛 LanguageTool
.github/copilot-instructions.md
[uncategorized] ~85-~85: The official name of this software platform is spelled with a capital “H”.
Context: ...t runs automatically in GitHub Actions (.github/workflows/ci.yml and publish.yml). C...
(GITHUB)
🔇 Additional comments (43)
test/unit/src/cdb.spec.ts (1)
22-22: Formatting change looks good.The trailing comma addition aligns with the project's new linting rules.
app/pages/sobre.vue (1)
6-10: Formatting improvements look good.Multi-line attribute formatting for HTML elements improves readability and aligns with the new linting configuration.
app/components/NavigationBar.vue (1)
8-85: Formatting improvements approved.The multi-line SVG attribute formatting improves readability without changing component behavior.
app/src/poupanca.ts (2)
1-15: Formatting changes look good.Semicolon removal and trailing comma additions align with the new linting configuration.
17-20: Verify period calculation uses correct day multiplier.Per coding guidelines, period conversion should use 1 month = 365/12 days (~30.42), not 30 days. The
daysInMonth = 30constant and1/30exponent ingetIndexPoupancamay deviate from the guideline. If poupança intentionally uses a 30-day banking month convention, consider documenting this exception.Based on coding guidelines for
app/{src/**,store/**}.ts.app/src/lcx.ts (1)
1-15: Formatting changes approved.The semicolon removal and trailing comma additions align with project linting standards. The 1/365 exponent correctly follows coding guidelines for period conversion.
app/layouts/default.vue (1)
7-17: Formatting improvements look good.Multi-line attribute formatting for NuxtLink and img elements improves readability. The layout correctly maintains consistent header structure across pages per coding guidelines.
app/src/finance.ts (3)
2-3: Formatting approved, and.toFixed(2)usage is correct.Semicolon removal aligns with linting rules. The use of
.toFixed(2)for currency precision follows coding guidelines.
6-19: IR tax brackets are correctly implemented.The day-based brackets match coding guidelines exactly:
- ≤180 days = 22.5%
- 181-360 days = 20%
- 361-720 days = 17.5%
720 days = 15%
Formatting changes (block structure) do not alter control flow.
21-33: IOF table implementation is correct.The 30-entry lookup table correctly handles days 1-30 with appropriate percentages, returning 0 for redemptions after day 30. This aligns with coding guidelines for IOF calculations.
test/unit/src/finance.spec.ts (1)
5-39: LGTM! Formatting changes align with linting standardization.All changes are purely stylistic (trailing commas, line breaks, consistent formatting) with no modifications to test logic or expectations. The test coverage remains comprehensive, including proper verification of IR tax brackets and IOF edge cases (particularly that IOF becomes 0 after day 30).
app/pages/como-calcular-juros-da-poupanca.vue (2)
5-9: LGTM! Template formatting improvements.The multi-line formatting of anchor tags and list items improves readability and aligns with the PR's linting standardization goals. All content and functionality remain unchanged.
Also applies to: 13-14, 17-18, 35-37, 44-48, 52-58
29-32: Good addition! Clarifies poupança anniversary date rules.The new paragraph provides valuable educational content explaining how the "data de aniversário" works for savings accounts, including the special handling of accounts opened on days 29, 30, and 31. This enhances user understanding of the calculation period.
app/src/cdb.ts (1)
7-8: LGTM! Formatting changes preserve financial calculation logic.All modifications are purely stylistic (multi-line type annotations, trailing commas, semicolon removal) with no alterations to the CDB calculation logic. The function continues to correctly calculate IR tax and IOF as required for CDB/RDB investments.
Also applies to: 12-13, 21-22
update-indexes.js (1)
1-77: LGTM! Formatting standardization with critical logic preserved.All changes are stylistic (quote normalization to single quotes, semicolon removal, brace placement) with no modifications to the BCB API integration logic. The correct series IDs remain intact (4391 for DI, 195 for Poupança, historicotaxasjuros for Selic), and the data fetching and file update logic is preserved.
app/components/investment/AmountInput.vue (1)
3-6: LGTM! Template and script formatting improvements.All changes are formatting adjustments that align with the PR's ESLint standardization:
- Multi-line formatting of template elements improves readability
- Input element structure updated per linting rules
- Import statement spacing and semicolon removal consistent with modern JavaScript style
The component's validation logic and store integration remain fully functional and unchanged.
Also applies to: 11-22, 27-32, 37-40, 47-48, 50-50
app/store/investment.ts (2)
15-20: LGTM! Correct TypeScript primitive type usage.Using lowercase
number | nullinstead ofNumber | nullis the correct TypeScript practice—primitive types are preferred over their object wrapper counterparts.
4-8: Portuguese terminology correctly maintained.The enum values correctly use Portuguese terminology (
'dias','meses','anos') as per coding guidelines. The trailing comma addition on line 7 aligns with the project's formatting standards.app/pages/index.vue (1)
12-20: LGTM! Store initialization and import patterns follow guidelines.The import uses the
~alias correctly for referencing the store, andstore.initializeStore()is called as required by the coding guidelines. Moving the import to the top of the script block improves readability.app/components/InvestmentResult.vue (1)
4-10: LGTM! Formatting improvements and color mapping structure.The multi-line element formatting and consistent trailing commas improve readability. The color mapping dictionaries are well-structured with appropriate fallback defaults.
Also applies to: 203-241
.github/workflows/publish.yml (1)
35-36: LGTM! Lint step correctly positioned in deployment workflow.Adding the lint check after dependency installation and before deployment ensures code style issues are caught before publishing. This aligns with the PR objective of integrating linting into CI/CD.
.github/workflows/ci.yml (2)
11-12: Good addition ofshow-progress: false.Suppressing checkout progress output reduces log noise in CI runs.
23-24: LGTM! Lint step added before tests.Running linting before tests is efficient—style issues are caught early without waiting for potentially longer test runs.
app/components/InvestmentInput.vue (1)
14-16: LGTM! Formatting improvement.Multi-line formatting for the header element aligns with the project's updated formatting standards.
eslint.config.mjs (1)
1-6: LGTM! Standard Nuxt ESLint flat config setup.This correctly integrates with the
@nuxt/eslintmodule by importing the auto-generated config from.nuxt/eslint.config.mjs. ThewithNuxtwrapper allows extending with custom rules when needed..github/copilot-instructions.md (2)
78-87: Well-documented linting workflow.The new Linting & Formatting section clearly explains the ESLint flat config approach, available scripts, and CI integration. This is helpful for onboarding developers to the project's style enforcement.
101-103: Key files reference updated appropriately.The updated references correctly point to lint-related configuration files and align with the new linting infrastructure.
package.json (1)
11-13: Lint scripts are correctly configured.The
lintandlint:fixscripts follow standard ESLint conventions.app/components/investment/PeriodInput.vue (1)
1-70: Formatting changes look good.The template and script formatting adjustments align with ESLint stylistic rules. The component correctly uses the
~alias for imports and is properly organized in theapp/components/investment/directory per coding guidelines.app/components/investment/PeriodTypeInput.vue (1)
1-53: Formatting changes are consistent.The component follows project conventions, correctly uses the
~alias, and is properly organized. The use ofPeriodTypesenum aligns with the Portuguese terminology convention. Based on learnings, the component correctly uses Portuguese terminology.app/components/investment/IndexSelicInput.vue (1)
1-73: Consistent formatting applied.The formatting adjustments are consistent with the other investment input components. The component correctly uses the
~alias and is properly located inapp/components/investment/as per coding guidelines.app/components/investment/IndexLcxInput.vue (1)
1-70: Formatting changes are appropriate.The component formatting aligns with ESLint stylistic rules and the broader formatting pass in this PR. It correctly uses the
~alias and is organized in the proper directory per coding guidelines.app/components/investment/IndexDiInput.vue (1)
1-74: Formatting changes look good.The component follows the same formatting patterns as the other investment input components. It correctly uses the
~alias and is properly organized per coding guidelines. Thestep=".01"attribute is appropriate for rate inputs requiring decimal precision.app/components/InvestmentSimulation.vue (4)
36-42: LGTM on imports and alias usage.Imports correctly use the
~alias to reference theapp/directory as required by coding guidelines. The import structure is clean and properly formatted.
52-76: Computed properties correctly recalculate on store changes.The computed properties (
resultCDB,resultLcx,resultPoupanca) properly depend on Pinia store values (investment.amount,investment.di,investment.cdb,investment.lcx,investment.poupanca,investment.period,investment.periodType), ensuring they recalculate whenever store values change. This aligns with the coding guidelines. Based on learnings, computed properties inInvestmentSimulation.vueshould recalculate results whenever Pinia store values change.
10-32: LGTM on InvestmentResult components.The template correctly binds to computed results and Pinia store values:
- Poupança: No tax props (correct for savings accounts)
- CDB/RDB: Includes tax-amount, tax-percentage, and iof-amount (correct for CDB/RDB investments)
- LCI/LCA: No tax props (correct for tax-exempt investments)
This aligns with the expected behavior per the coding guidelines. Based on learnings, CDB/RDB investments require both IR tax and IOF penalty calculations while LCI/LCA are tax-exempt.
46-50: Use Portuguese terminology for period types to align with coding guidelines.The coding guidelines specify using Portuguese terminology:
PeriodTypes.Dias,meses,anos. Update theperiodMultiplierkeys from English (Days,Months,Years) to Portuguese to match the required conventions.app/components/investment/IndexCdbInput.vue (2)
46-48: LGTM on imports and component organization.The component is correctly organized in
app/components/investment/and uses the~alias for the store import as required by coding guidelines.
1-43: Template formatting looks good.The formatting changes (multiline attributes, consistent quoting) improve readability and align with the PR's linting standardization goals.
nuxt.config.ts (4)
7-12: LGTM on module configuration.The modules array properly includes the essential Nuxt modules:
@pinia/nuxtfor state managementnuxt-schema-orgfor SEO/structured data@nuxt/test-utils/modulefor testing@nuxt/eslintfor linting integrationThis aligns with the PR's goal of adding linting checks to CI/CD.
64-67: Site configuration properly set.The site URL and name are correctly configured for the GitHub Pages deployment.
73-73: VerifycompatibilityDateis appropriate for your Nuxt version.The
compatibilityDateis set to'2025-01-16'. Ensure this aligns with your project's Nuxt version requirements and feature expectations.
79-86: ESLint configuration correctly enables stylistic enforcement.The ESLint configuration with
stylistic: trueandchecker: truealigns with @nuxt/eslint documentation and will enforce consistent code formatting at dev time. The inline comments explaining each option are helpful and accurate.
…s in InvestmentResult component
# Conflicts: # .github/copilot-instructions.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 11
🧹 Nitpick comments (5)
app/components/InvestmentResult.vue (2)
157-157: Simplify validator - unnecessary type conversions.The
parseFloat(value.toString())conversion is redundant sincevalueis already typed asnumber. The validator can be simplified to just check if the value is positive.🔎 Proposed fix
- validator: (value: number) => parseFloat(value.toString()) > 0, + validator: (value: number) => value > 0,
186-187: Remove unused computed property.The
hasAmountcomputed property is defined but never used in the template or other computed properties. Consider removing it unless it's planned for future use.🔎 Proposed fix
-// eslint-disable-next-line @typescript-eslint/no-unused-vars -const hasAmount = computed(() => !!props.amount)app/components/investment/AmountInput.vue (1)
57-62: Consider simplifying validation logic.The validation function works correctly but could be more concise. The
!valuecheck is somewhat redundant sinceNumber(value) > 0implicitly handles most falsy cases.🔎 Proposed simplification
const validateAmount = (value: number | null): boolean => { - if (!value) { - return false - } - return Number(value) > 0 + return value != null && Number(value) > 0 }This version explicitly checks for null/undefined and then validates positivity in a single expression.
update-indexes.mjs (2)
81-81: Consider adding explicit exit code handling for CI/CD usage.The script executes at the module level but doesn't explicitly set exit codes. If any updates fail, CI/CD pipelines won't detect the failure. Consider catching errors at this level and using
process.exit(1)on failure.🔎 Proposed enhancement
-await updateIndicadores() +try { + await updateIndicadores() + process.exit(0) +} catch (error) { + console.error('Script failed:', error) + process.exit(1) +}
15-15: Consider adding timeout configuration to axios requests.None of the axios requests have timeout configurations. If the BCB API becomes unresponsive, the script could hang indefinitely, which is problematic for CI/CD workflows or pre-commit hooks.
🔎 Proposed enhancement
Add a default timeout configuration for all axios requests by creating an axios instance:
import axios from 'axios' import fs from 'fs' import path from 'path' import { fileURLToPath } from 'url' +const axiosInstance = axios.create({ + timeout: 30000 // 30 seconds +}) + const __filename = fileURLToPath(import.meta.url)Then replace
axios.getwithaxiosInstance.getthroughout the file.Based on learnings, this script should be run before commits to keep indicadores.json current with BCB API data.
Also applies to: 33-33, 47-47
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
.github/copilot-instructions.mdapp/components/InvestmentResult.vueapp/components/investment/AmountInput.vueapp/components/investment/IndexCdbInput.vueapp/pages/index.vueapp/src/finance.tspackage.jsonupdate-indexes.mjs
🚧 Files skipped from review as they are similar to previous changes (4)
- package.json
- app/components/investment/IndexCdbInput.vue
- app/src/finance.ts
- app/pages/index.vue
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,vue,js}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use the ~ alias to reference app/ directory in imports throughout the project
Files:
app/components/InvestmentResult.vueapp/components/investment/AmountInput.vue
**/*.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.vue: Use Tailwind CSS + Vite integration via @tailwindcss/vite plugin in nuxt.config.ts
Use app/layouts/default.vue for consistent header/footer across all pages
Files:
app/components/InvestmentResult.vueapp/components/investment/AmountInput.vue
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to eslint.config.mjs : Configure ESLint using flat config format in eslint.config.mjs
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to app/assets/indicadores.json : Always run `pnpm update-indexes` before commits to keep app/assets/indicadores.json current with BCB API data
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to app/assets/indicadores.json : Do not commit hardcoded values to app/assets/indicadores.json; always fetch fresh data from BCB API via update-indexes.js
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/update-indexes.js : Fetch market indices from BCB API endpoints in update-indexes.js: Series 4391 (DI) and others defined in the script
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/update-indexes.js : Fetch market indices from BCB API endpoints in update-indexes.js: Series 4391 (DI) and others defined in the script
Applied to files:
update-indexes.mjs
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to app/assets/indicadores.json : Do not commit hardcoded values to app/assets/indicadores.json; always fetch fresh data from BCB API via update-indexes.js
Applied to files:
update-indexes.mjs
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to app/assets/indicadores.json : Always run `pnpm update-indexes` before commits to keep app/assets/indicadores.json current with BCB API data
Applied to files:
update-indexes.mjs
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/{cdb,lcx,poupanca}.ts : Each investment type module must follow the pattern: export a get<Type>Result() function returning { interestAmount, taxAmount, taxPercentage, iofAmount }
Applied to files:
update-indexes.mjs
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/poupanca.ts : Savings account calculations use simple monthly rates with no tax deductions
Applied to files:
app/components/InvestmentResult.vue
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/finance.ts : Use .toFixed(2) for all currency calculations to maintain decimal precision
Applied to files:
app/components/InvestmentResult.vueapp/components/investment/AmountInput.vue
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to eslint.config.mjs : Configure ESLint using flat config format in eslint.config.mjs
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Use Nuxt 4 + Vue 3 with TypeScript for the frontend stack with Pinia for state management
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/*.vue : Use Tailwind CSS + Vite integration via tailwindcss/vite plugin in nuxt.config.ts
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/pages/index.vue : Initialize Pinia store via store.initializeStore() in the index.vue page component
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/test/unit/**/*.spec.ts : Use Vitest with describe/it blocks for unit testing following test/unit/src/ directory structure
Applied to files:
.github/copilot-instructions.md
📚 Learning: 2026-01-01T14:08:32.273Z
Learnt from: CR
Repo: rendafixa/rendafixa.github.io PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-01-01T14:08:32.273Z
Learning: Applies to **/test/unit/**/*.spec.ts : Test all critical financial calculations exhaustively including tax tables, compound interest formulas, and edge cases (IOF bounds, period conversions)
Applied to files:
.github/copilot-instructions.md
🧬 Code graph analysis (1)
update-indexes.mjs (1)
update-indexes.js (3)
path(3-3)fs(2-2)axios(1-1)
🪛 LanguageTool
.github/copilot-instructions.md
[uncategorized] ~85-~85: The official name of this software platform is spelled with a capital “H”.
Context: ...t runs automatically in GitHub Actions (.github/workflows/ci.yml and publish.yml). C...
(GITHUB)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: SonarCloud
🔇 Additional comments (5)
.github/copilot-instructions.md (1)
78-87: Documentation is accurate and comprehensive.The Linting & Formatting section correctly documents the ESLint flat config setup, lint scripts, CI/CD integration, and absence of
.editorconfig. All referenced files (eslint.config.mjs, package.json scripts, and CI workflows) exist and match the documented configuration.app/components/investment/AmountInput.vue (4)
3-46: LGTM! Template formatting and accessibility are well-implemented.The template changes include proper formatting, consistent use of Tailwind CSS, and correct accessibility attributes (
aria-describedby,aria-live,idreferences). The conditional validation styling enhances user experience.
51-52: LGTM! Imports follow project conventions.The imports correctly use the
~alias and have standardized spacing around braces.As per coding guidelines, the
~alias is properly used to reference the app/ directory.
64-72: LGTM! Computed property pattern is sound.The getter/setter pattern for
amountcorrectly filters invalid input at the component level and only propagates valid values to the store. This prevents the store from ever holding invalid state.Note: The effectiveness of this pattern depends on resolving the state synchronization issue flagged at line 55.
74-84: LGTM! Validation computeds are well-implemented.The
isValidanderrorMessagecomputed properties provide clear, reactive validation state with user-friendly localized messages. The logic properly covers all validation cases (missing value and non-positive numbers).
…js to update-indexes.mjs
…ues in update-indexes.mjs
…s and AmountInput.vue
…g in AmountInput tests
|



Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.