vue/no-loss-of-precision
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-loss-of-precision": "error",
},
},
];const x = 9007199254740993const x = 5.123000000000000000000000000001const x = 0x20000000000001const x = 12345
const x = 123.456
const x = 123e34
const x = 12300000000000000000000000
const x = 0x1FFFFFFFFFFFFF
const x = 9007199254740991
const x = 9007_1992547409_91Examples from the Biome documentation.
vue/no-loss-of-precision
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-loss-of-precision": "error",
},
},
];Oxlint does not have this rule.
correctness/noPrecisionLoss
correctness · since 1.0.0
{
"linter": {
"rules": {
"correctness": {
"noPrecisionLoss": "error"
}
}
}
}Disallow literal numbers that lose precision
Disallow literal numbers that lose precision
Disallow numeric literals that lose precision when represented as IEEE 754 binary64 values.
Disallow irregular whitespace in .vue files
Disallow empty destructuring patterns in <template>