no-zero-fractions
UnreleasedConfiguration
rslint.config.ts
Rule Details
Remove trailing zero fractions and dangling decimal points from numeric literals. For example, 1.0 becomes 1, 1.010 becomes 1.01, and 1. becomes 1. Numeric separators and exponent spelling are preserved outside the removed fraction.
The rule provides an automatic fix. It preserves required parentheses, keyword spacing, and statement boundaries when changing a numeric member receiver.
Examples of incorrect code:
Examples of correct code:
Options
This rule has no options.