unicorn/no-loss-of-precision
eslint-plugin-unicorn
No autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-loss-of-precision": "error",
},
},
];Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
No code example for this rule
The linters' documentation does not include one we could extract.
unicorn/no-loss-of-precision
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-loss-of-precision": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow literal numbers that lose precision
Disallow literal numbers that lose precision
Disallow literal numbers that lose precision in <template>
Disallow invalid accept values on file inputs.