refactor: migrate from ESLint to Biome and extract SQL queries to data.ts

- Replace ESLint with Biome for linting and formatting
- Configure Biome with tabs, double quotes, and organized imports
- Move all SQL/Drizzle queries from page.tsx files to data.ts files
- Create new data.ts files for: ajustes, dashboard, relatorios/categorias
- Update existing data.ts files: extrato, fatura (add lancamentos queries)
- Remove all drizzle-orm imports from page.tsx files
- Update README.md with new tooling info

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Felipe Coutinho
2026-01-27 13:15:37 +00:00
parent 8ffe61c59b
commit a7f63fb77a
442 changed files with 66141 additions and 69292 deletions

View File

@@ -8,11 +8,11 @@
* @returns Formatted string with 2 decimal places, or null if input is null
*/
export function formatDecimalForDb(value: number | null): string | null {
if (value === null) {
return null;
}
if (value === null) {
return null;
}
return (Math.round(value * 100) / 100).toFixed(2);
return (Math.round(value * 100) / 100).toFixed(2);
}
/**
@@ -21,7 +21,7 @@ export function formatDecimalForDb(value: number | null): string | null {
* @returns Formatted string with 2 decimal places
*/
export function formatDecimalForDbRequired(value: number): string {
return (Math.round(value * 100) / 100).toFixed(2);
return (Math.round(value * 100) / 100).toFixed(2);
}
/**
@@ -30,7 +30,7 @@ export function formatDecimalForDbRequired(value: number): string {
* @returns Normalized string with period as decimal separator
*/
export function normalizeDecimalInput(value: string): string {
return value.replace(/\s/g, "").replace(",", ".");
return value.replace(/\s/g, "").replace(",", ".");
}
/**
@@ -39,11 +39,11 @@ export function normalizeDecimalInput(value: string): string {
* @returns Formatted string or empty string
*/
export function formatLimitInput(value?: number | null): string {
if (value === null || value === undefined || Number.isNaN(value)) {
return "";
}
if (value === null || value === undefined || Number.isNaN(value)) {
return "";
}
return (Math.round(value * 100) / 100).toFixed(2);
return (Math.round(value * 100) / 100).toFixed(2);
}
/**
@@ -52,9 +52,9 @@ export function formatLimitInput(value?: number | null): string {
* @returns Formatted string with default "0.00"
*/
export function formatInitialBalanceInput(value?: number | null): string {
if (value === null || value === undefined || Number.isNaN(value)) {
return "0.00";
}
if (value === null || value === undefined || Number.isNaN(value)) {
return "0.00";
}
return (Math.round(value * 100) / 100).toFixed(2);
return (Math.round(value * 100) / 100).toFixed(2);
}