finlint-check
v1.0.0
Published
Zero-config financial code scanner — find float precision bugs instantly
Downloads
126
Maintainers
Readme
finlint-check
Zero-config financial code scanner. Find float precision bugs instantly — no ESLint config, no pylint, no YAML.
npx finlint-check .What it finds
16 rules across JavaScript/TypeScript (AST-based) and Python (regex-based):
JS/TS (8 rules)
| Rule | Severity | Detects |
|------|----------|---------|
| no-float-money | CRITICAL | const amount = 19.99, price: number |
| money-parse | HIGH | parseFloat(amount), Number(price), +amount |
| no-math-round-money | HIGH | Math.round(amount) |
| decimal-from-string | HIGH | new Decimal(0.1) |
| intl-number-format | MEDIUM | amount.toFixed(2) |
| no-json-number-parse | MEDIUM | JSON.parse(data) without reviver |
| negative-zero-check | MEDIUM | amount === 0 |
| intl-format-only | MEDIUM | "$" + amount |
Python (8 rules)
| Rule | Severity | Detects |
|------|----------|---------|
| FIN001 | CRITICAL | amount = 19.99, balance: float |
| FIN002 | HIGH | Decimal(0.1) |
| FIN004 | HIGH | round(amount, 2) |
| FIN010 | HIGH | amount * 0.15 |
| FIN005 | MEDIUM | class Invoice(BaseModel): amount: float |
| FIN006 | MEDIUM | {"amount": 19.99} |
| FIN007 | MEDIUM | Column(Float) |
| PIPE005 | MEDIUM | Decimal("10") * 0.5 |
Output
finlint-check v1.0.0 — scanned 47 files
CRITICAL src/billing.js:23 float literal on financial variable 'amount' (no-float-money)
HIGH src/cart.ts:89 parseFloat() on financial variable 'price' (money-parse)
MEDIUM src/tax.js:12 .toFixed() on financial variable 'tax' (intl-number-format)
Found 3 issues in 47 files (1 critical, 1 high, 1 medium)
Fix guide: https://finlint.dev/fixOptions
--format <text|json|github-actions> Output format (default: text)
--js-only Scan only JS/TS files
--py-only Scan only Python files
--ignore <pattern> Exclude files matching glob (repeatable)
--quiet, -q Suppress warnings (only output issues)
--version Print version
--help Show helpCI Integration
# GitHub Actions
- run: npx finlint-check . --format github-actionsExit Codes
0— No issues found1— Issues found2— Usage error
File Discovery
Automatically excludes: node_modules/, .git/, __pycache__/, .venv/, dist/, build/, *.min.js, files >1MB. Respects .gitignore.
License
Apache-2.0
