Skip to content

Conversation

@marcelorodrigo
Copy link
Member

@marcelorodrigo marcelorodrigo commented Jan 1, 2026

Summary by CodeRabbit

  • New Features

    • Integrated project linting with automated checks running in CI.
  • Documentation

    • Added a factual paragraph clarifying savings-account interest ("poupança") calculation.
  • Chores

    • Standardized code style and updated tooling/scripts for linting and maintenance.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 1, 2026

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 40c5983 and c4b97e4.

📒 Files selected for processing (9)
  • .github/copilot-instructions.md
  • .github/workflows/ci.yml
  • .github/workflows/publish.yml
  • .github/workflows/update-indexes.yml
  • app/components/InvestmentResult.vue
  • app/components/investment/AmountInput.vue
  • test/nuxt/AmountInput.test.ts
  • update-indexes.js
  • update-indexes.mjs
📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Linting & CI
eslint.config.mjs, package.json, .github/workflows/ci.yml, .github/workflows/publish.yml, .github/copilot-instructions.md
Added ESLint flat-config entry, npm lint scripts, CI/publish lint steps, and documentation for lint/format workflow.
Nuxt config & metadata
nuxt.config.ts
Introduced modules, site, compatibilityDate, devtools, and eslint config; restructured head/meta and added manifest link.
New index updater script
update-indexes.mjs
New ES module that sequentially fetches DI/SELIC/POUPANCA from external APIs and writes updates to indicadores.json.
Removed editor rules
.editorconfig
Deleted; project formatting rules moved to ESLint.
Store type fixes
app/store/investment.ts
Corrected state types from `Number
Input components (formatting & small logic)
app/components/investment/AmountInput.vue, IndexCdbInput.vue, IndexDiInput.vue, IndexLcxInput.vue, IndexSelicInput.vue, PeriodInput.vue, PeriodTypeInput.vue
Mostly template reformatting and attribute reflow; AmountInput.vue adds a computed getter/setter with validation syncing to store; several inputs have template syntax changes that may affect validity.
UI components (formatting)
app/components/InvestmentInput.vue, InvestmentResult.vue, InvestmentSimulation.vue, NavigationBar.vue, app/layouts/default.vue
Template reflows, attribute wrapping, and minor JSX/HTML formatting; InvestmentResult.vue introduced new computed flags and replaced string-key maps with identifier-key maps.
Pages & content
app/pages/como-calcular-juros-da-poupanca.vue, app/pages/index.vue, app/pages/sobre.vue
Added factual paragraph about poupança anniversary rule; reordered imports and adjusted whitespace/markup.
Utilities & types (formatting)
app/src/cdb.ts, app/src/finance.ts, app/src/lcx.ts, app/src/poupanca.ts, update-indexes.js
Formatting, trailing commas, semicolon/style normalization; no intended behavioral changes.
Tests
test/nuxt/AmountInput.test.ts, test/unit/src/cdb.spec.ts, test/unit/src/finance.spec.ts
Minor formatting changes (trailing commas, blank-line removals).

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰
I hopped through lint and tidy lines,
Fixed types, rearranged the signs,
Fetched indexes from far and wide,
Wrote them down with quiet pride,
A carrot-coded repo, all aligned! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main objectives: adding linting to CI/CD pipelines and fixing code style issues throughout the codebase, which aligns with the extensive changes across configuration files, components, and tests.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

# Conflicts:
#	app/components/investment/AmountInput.vue
#	app/pages/index.vue
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 when iofAmount is null.

props.iofAmount defaults to null (line 177), but it's used directly in arithmetic on line 190 without null coalescing. This will produce NaN when iofAmount is 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 unused hasAmount computed property.

The hasAmount variable 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 the app/ 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 the app/ directory in imports".

package.json (1)

24-24: Consider using @stylistic/eslint-plugin instead of the deprecated eslint-stylistic package.

The eslint-stylistic package (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 unused rules object or integrating it.

The rules object is explicitly marked as unused with an ESLint disable comment, and its validation logic is duplicated in the isValid and errorMessage computed properties (lines 63-78). This is dead code.

Consider either:

  1. Removing the rules object entirely, or
  2. Refactoring to use rules in the computed properties to avoid duplication
Option 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6c313e8 and 59809d2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (31)
  • .editorconfig
  • .github/copilot-instructions.md
  • .github/workflows/ci.yml
  • .github/workflows/publish.yml
  • app/components/InvestmentInput.vue
  • app/components/InvestmentResult.vue
  • app/components/InvestmentSimulation.vue
  • app/components/NavigationBar.vue
  • app/components/investment/AmountInput.vue
  • app/components/investment/IndexCdbInput.vue
  • app/components/investment/IndexDiInput.vue
  • app/components/investment/IndexLcxInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/layouts/default.vue
  • app/pages/como-calcular-juros-da-poupanca.vue
  • app/pages/index.vue
  • app/pages/sobre.vue
  • app/src/cdb.ts
  • app/src/finance.ts
  • app/src/lcx.ts
  • app/src/poupanca.ts
  • app/store/investment.ts
  • eslint.config.mjs
  • nuxt.config.ts
  • package.json
  • test/nuxt/AmountInput.test.ts
  • test/unit/src/cdb.spec.ts
  • test/unit/src/finance.spec.ts
  • update-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.ts
  • app/src/lcx.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/src/cdb.ts
app/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use the ~ alias to reference the app/ directory in imports

Files:

  • app/store/investment.ts
  • app/src/lcx.ts
  • app/components/InvestmentSimulation.vue
  • app/components/investment/IndexCdbInput.vue
  • app/pages/sobre.vue
  • app/components/InvestmentInput.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/src/finance.ts
  • app/components/NavigationBar.vue
  • app/src/poupanca.ts
  • app/pages/index.vue
  • app/components/investment/AmountInput.vue
  • app/pages/como-calcular-juros-da-poupanca.vue
  • app/layouts/default.vue
  • app/src/cdb.ts
  • app/components/investment/IndexLcxInput.vue
  • app/components/InvestmentResult.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/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.ts
  • app/src/lcx.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/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.ts
  • app/components/InvestmentSimulation.vue
  • app/components/InvestmentInput.vue
  • app/components/NavigationBar.vue
  • app/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.ts
  • app/src/poupanca.ts
  • app/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.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/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.ts
  • app/src/cdb.ts
app/components/**/InvestmentSimulation.vue

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Computed properties in InvestmentSimulation.vue should 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.vue
  • app/components/investment/IndexCdbInput.vue
  • app/components/InvestmentInput.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/components/NavigationBar.vue
  • app/components/investment/AmountInput.vue
  • app/components/investment/IndexLcxInput.vue
  • app/components/InvestmentResult.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/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.ts
  • test/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.ts
  • test/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.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/components/investment/AmountInput.vue
  • app/components/investment/IndexLcxInput.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/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.ts
  • app/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.js which fetches data from BCB API endpoints and updates app/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.vue for 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.md
  • app/src/lcx.ts
  • test/unit/src/finance.spec.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • test/unit/src/cdb.spec.ts
  • app/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.md
  • app/components/InvestmentSimulation.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/pages/index.vue
  • app/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.md
  • app/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.md
  • 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/{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.ts
  • app/components/InvestmentSimulation.vue
  • app/components/investment/IndexCdbInput.vue
  • app/components/InvestmentInput.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/pages/index.vue
  • app/components/investment/AmountInput.vue
  • update-indexes.js
  • app/pages/como-calcular-juros-da-poupanca.vue
  • app/components/investment/IndexLcxInput.vue
  • app/components/InvestmentResult.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/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.ts
  • app/src/lcx.ts
  • app/components/InvestmentSimulation.vue
  • test/unit/src/finance.spec.ts
  • app/components/investment/PeriodTypeInput.vue
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/src/cdb.ts
  • app/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.ts
  • app/src/lcx.ts
  • app/components/InvestmentSimulation.vue
  • test/unit/src/finance.spec.ts
  • app/components/investment/IndexCdbInput.vue
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/pages/index.vue
  • app/components/investment/AmountInput.vue
  • update-indexes.js
  • app/pages/como-calcular-juros-da-poupanca.vue
  • app/src/cdb.ts
  • app/components/InvestmentResult.vue
  • app/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.ts
  • app/src/lcx.ts
  • app/components/InvestmentSimulation.vue
  • test/unit/src/finance.spec.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/pages/index.vue
  • app/pages/como-calcular-juros-da-poupanca.vue
  • app/src/cdb.ts
  • app/components/InvestmentResult.vue
  • app/components/investment/IndexSelicInput.vue
  • app/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.ts
  • app/src/lcx.ts
  • app/components/investment/PeriodTypeInput.vue
  • app/src/finance.ts
  • app/src/poupanca.ts
  • test/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.ts
  • app/src/lcx.ts
  • app/components/InvestmentSimulation.vue
  • test/unit/src/finance.spec.ts
  • app/components/investment/IndexCdbInput.vue
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/pages/index.vue
  • app/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.ts
  • app/components/InvestmentSimulation.vue
  • app/components/investment/IndexCdbInput.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/components/investment/AmountInput.vue
  • app/components/investment/IndexLcxInput.vue
  • app/components/InvestmentResult.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/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.ts
  • app/src/lcx.ts
  • test/unit/src/finance.spec.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/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.ts
  • app/src/lcx.ts
  • app/components/InvestmentSimulation.vue
  • test/unit/src/finance.spec.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • app/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.ts
  • 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 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.ts
  • test/unit/src/finance.spec.ts
  • app/src/finance.ts
  • app/src/poupanca.ts
  • test/unit/src/cdb.spec.ts
  • app/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.vue
  • app/components/investment/IndexCdbInput.vue
  • app/components/InvestmentInput.vue
  • app/components/investment/PeriodTypeInput.vue
  • app/pages/index.vue
  • app/components/investment/AmountInput.vue
  • app/components/investment/IndexLcxInput.vue
  • app/components/InvestmentResult.vue
  • app/components/investment/PeriodInput.vue
  • app/components/investment/IndexSelicInput.vue
  • app/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.ts
  • app/src/finance.ts
  • app/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.vue
  • app/layouts/default.vue
  • app/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 = 30 constant and 1/30 exponent in getIndexPoupanca may 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 | null instead of Number | null is 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, and store.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 of show-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/eslint module by importing the auto-generated config from .nuxt/eslint.config.mjs. The withNuxt wrapper 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 lint and lint:fix scripts 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 the app/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 of PeriodTypes enum 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 in app/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. The step=".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 the app/ 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 in InvestmentSimulation.vue should 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 the periodMultiplier keys 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/nuxt for state management
  • nuxt-schema-org for SEO/structured data
  • @nuxt/test-utils/module for testing
  • @nuxt/eslint for linting integration

This 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: Verify compatibilityDate is appropriate for your Nuxt version.

The compatibilityDate is 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: true and checker: true aligns with @nuxt/eslint documentation and will enforce consistent code formatting at dev time. The inline comments explaining each option are helpful and accurate.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 since value is already typed as number. 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 hasAmount computed 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 !value check is somewhat redundant since Number(value) > 0 implicitly 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.get with axiosInstance.get throughout 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

📥 Commits

Reviewing files that changed from the base of the PR and between 59809d2 and 40c5983.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .github/copilot-instructions.md
  • app/components/InvestmentResult.vue
  • app/components/investment/AmountInput.vue
  • app/components/investment/IndexCdbInput.vue
  • app/pages/index.vue
  • app/src/finance.ts
  • package.json
  • update-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.vue
  • app/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.vue
  • app/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.vue
  • app/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, id references). 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 amount correctly 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 isValid and errorMessage computed properties provide clear, reactive validation state with user-friendly localized messages. The logic properly covers all validation cases (missing value and non-positive numbers).

@marcelorodrigo marcelorodrigo changed the title Add linting checks to CI/CD and fix code style issues feat:Add linting checks to CI/CD and fix code style issues Jan 1, 2026
@marcelorodrigo marcelorodrigo changed the title feat:Add linting checks to CI/CD and fix code style issues feat: Add linting checks to CI/CD and fix code style issues Jan 1, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 1, 2026

@marcelorodrigo marcelorodrigo merged commit d3e40fb into master Jan 1, 2026
5 checks passed
@marcelorodrigo marcelorodrigo deleted the lint branch January 1, 2026 16:00
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.

2 participants