diff --git a/docs/rules/no-zero-fractions.md b/docs/rules/no-zero-fractions.md index 37d52f796f..c0d323e3fa 100644 --- a/docs/rules/no-zero-fractions.md +++ b/docs/rules/no-zero-fractions.md @@ -4,27 +4,58 @@ There is no difference in JavaScript between, for example, `1`, `1.0` and `1.`, This rule is fixable. - ## Fail ```js const foo = 1.0; +``` + +```js const foo = -1.0; -const foo = 123123123.0; +``` + +```js +const foo = 123_456.000_000; +``` + +```js const foo = 1.; +``` + +```js const foo = 123.111000000; -const foo = 123.00e20; ``` +```js +const foo = 123.00e20; +``` ## Pass ```js const foo = 1; +``` + +```js const foo = -1; -const foo = 123123123; +``` + +```js +const foo = 123456; +``` + +```js const foo = 1.1; +``` + +```js const foo = -1.1; -const foo = 123123123.4; +``` + +```js +const foo = 123.456; +``` + +```js const foo = 1e3; ``` diff --git a/rules/no-zero-fractions.js b/rules/no-zero-fractions.js index 2d198d0948..8830fd8cd4 100644 --- a/rules/no-zero-fractions.js +++ b/rules/no-zero-fractions.js @@ -1,5 +1,8 @@ 'use strict'; +const {isParenthesized} = require('eslint-utils'); const getDocumentationUrl = require('./utils/get-documentation-url'); +const needsSemicolon = require('./utils/needs-semicolon'); +const {isNumber, isDecimalInteger} = require('./utils/numeric'); const MESSAGE_ZERO_FRACTION = 'zero-fraction'; const MESSAGE_DANGLING_DOT = 'dangling-dot'; @@ -8,45 +11,54 @@ const messages = { [MESSAGE_DANGLING_DOT]: 'Don\'t use a dangling dot in the number.' }; -// Groups: -// 1. Integer part. -// 2. Dangling dot or dot with zeroes. -// 3. Dot with digits except last zeroes. -// 4. Scientific notation. -const RE_DANGLINGDOT_OR_ZERO_FRACTIONS = /^(?[+-]?\d*)(?:(?\.0*)|(?\.\d*[1-9])0+)(?e[+-]?\d+)?$/; - const create = context => { return { Literal: node => { - if (typeof node.value !== 'number') { + if (!isNumber(node)) { return; } - const match = RE_DANGLINGDOT_OR_ZERO_FRACTIONS.exec(node.raw); - if (match === null) { + // Legacy octal number `0777` and prefixed number `0o1234` cannot have a dot. + const {raw} = node; + const match = raw.match(/^(?[\d_]*)(?\.[\d_]*)(?.*)$/); + if (!match) { return; } - const { - integerPart, - dotAndZeroes, - dotAndDigits, - scientificNotationSuffix - } = match.groups; + const {before, dotAndFractions, after} = match.groups; + const formatted = before + dotAndFractions.replace(/[.0_]+$/g, '') + after; - const isDanglingDot = dotAndZeroes === '.'; + if (formatted === raw) { + return; + } + const isDanglingDot = dotAndFractions === '.'; + // End of fractions + const end = node.range[0] + before.length + dotAndFractions.length; + const start = end - (raw.length - formatted.length); + const sourceCode = context.getSourceCode(); context.report({ - node, + loc: { + start: sourceCode.getLocFromIndex(start), + end: sourceCode.getLocFromIndex(end) + }, messageId: isDanglingDot ? MESSAGE_DANGLING_DOT : MESSAGE_ZERO_FRACTION, fix: fixer => { - let wantedString = dotAndZeroes === undefined ? integerPart + dotAndDigits : integerPart; + let fixed = formatted; + if ( + node.parent.type === 'MemberExpression' && + node.parent.object === node && + isDecimalInteger(formatted) && + !isParenthesized(node, sourceCode) + ) { + fixed = `(${fixed})`; - if (scientificNotationSuffix !== undefined) { - wantedString += scientificNotationSuffix; + if (needsSemicolon(sourceCode.getTokenBefore(node), sourceCode, fixed)) { + fixed = `;${fixed}`; + } } - return fixer.replaceText(node, wantedString); + return fixer.replaceText(node, fixed); } }); } diff --git a/rules/numeric-separators-style.js b/rules/numeric-separators-style.js index 9b1f20b6d4..ad1ed55e8a 100644 --- a/rules/numeric-separators-style.js +++ b/rules/numeric-separators-style.js @@ -35,7 +35,7 @@ function addSeparatorFromLeft(value, options) { } function formatNumber(value, options) { - const {integer, dot, fractional} = numeric.parseFloat(value); + const {integer, dot, fractional} = numeric.parseFloatNumber(value); return addSeparator(integer, options) + dot + addSeparatorFromLeft(fractional, options); } @@ -99,7 +99,7 @@ const create = context => { return { Literal: node => { - if (!numeric.isNumberic(node) || numeric.isLegacyOctal(node)) { + if (!numeric.isNumeric(node) || numeric.isLegacyOctal(node)) { return; } diff --git a/rules/utils/numeric.js b/rules/utils/numeric.js index fce19afc97..6d698755b8 100644 --- a/rules/utils/numeric.js +++ b/rules/utils/numeric.js @@ -3,11 +3,12 @@ // Determine whether this node is a decimal integer literal. // Copied from https://github.com/eslint/eslint/blob/cc4871369645c3409dc56ded7a555af8a9f63d51/lib/rules/utils/ast-utils.js#L1237 const DECIMAL_INTEGER_PATTERN = /^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u; -const isDecimalInteger = node => isNumber(node) && DECIMAL_INTEGER_PATTERN.test(node.raw); +const isDecimalInteger = text => DECIMAL_INTEGER_PATTERN.test(text); +const isDecimalIntegerNode = node => isNumber(node) && isDecimalInteger(node.raw); const isNumber = node => typeof node.value === 'number'; const isBigInt = node => Boolean(node.bigint); -const isNumberic = node => isNumber(node) || isBigInt(node); +const isNumeric = node => isNumber(node) || isBigInt(node); const isLegacyOctal = node => isNumber(node) && /^0\d+$/.test(node.raw); function getPrefix(text) { @@ -28,12 +29,12 @@ function parseNumber(text) { mark = '', sign = '', power = '' - } = text.match(/^(?.*?)(?:(?e)(?[+-])?(?\d+))?$/i).groups; + } = text.match(/^(?[\d._]*?)(?:(?[Ee])(?[+-])?(?[\d_]+))?$/).groups; return {number, mark, sign, power}; } -function parseFloat(text) { +function parseFloatNumber(text) { const parts = text.split('.'); const [integer, fractional = ''] = parts; const dot = parts.length === 2 ? '.' : ''; @@ -41,4 +42,14 @@ function parseFloat(text) { return {integer, dot, fractional}; } -module.exports = {isNumber, isBigInt, isNumberic, isLegacyOctal, getPrefix, parseNumber, parseFloat, isDecimalInteger}; +module.exports = { + isDecimalIntegerNode, + isDecimalInteger, + isNumber, + isBigInt, + isNumeric, + isLegacyOctal, + getPrefix, + parseNumber, + parseFloatNumber +}; diff --git a/rules/utils/should-add-parentheses-to-member-expression-object.js b/rules/utils/should-add-parentheses-to-member-expression-object.js index fbad4f099f..d945204599 100644 --- a/rules/utils/should-add-parentheses-to-member-expression-object.js +++ b/rules/utils/should-add-parentheses-to-member-expression-object.js @@ -1,7 +1,7 @@ 'use strict'; const isNewExpressionWithParentheses = require('./is-new-expression-with-parentheses'); -const {isDecimalInteger} = require('./numeric'); +const {isDecimalIntegerNode} = require('./numeric'); /** Check if parentheses should to be added to a `node` when it's used as an `object` of `MemberExpression`. @@ -24,7 +24,7 @@ function shouldAddParenthesesToMemberExpressionObject(node, sourceCode) { return !isNewExpressionWithParentheses(node, sourceCode); case 'Literal': { /* istanbul ignore next */ - if (isDecimalInteger(node)) { + if (isDecimalIntegerNode(node)) { return true; } diff --git a/test/no-zero-fractions.mjs b/test/no-zero-fractions.mjs index 37ba82f2c1..c243bebcc6 100644 --- a/test/no-zero-fractions.mjs +++ b/test/no-zero-fractions.mjs @@ -1,17 +1,9 @@ +import outdent from 'outdent'; import {getTester} from './utils/test.mjs'; const {test} = getTester(import.meta); -const MESSAGE_ZERO_FRACTION = 'zero-fraction'; -const MESSAGE_DANGLING_DOT = 'dangling-dot'; -const errorZeroFraction = { - messageId: MESSAGE_ZERO_FRACTION -}; -const errorDanglingDot = { - messageId: MESSAGE_DANGLING_DOT -}; - -test({ +test.snapshot({ valid: [ 'const foo = "123.1000"', 'foo("123.1000")', @@ -22,86 +14,71 @@ test({ 'const foo = 1.1', 'const foo = -1.1', 'const foo = 123123123.4', - 'const foo = 1e3' + 'const foo = 1e3', + '1 .toString()' ], - invalid: [ - { - code: 'const foo = 1.0', - output: 'const foo = 1', - errors: [errorZeroFraction] - }, - { - code: 'const foo = 1.0 + 1', - output: 'const foo = 1 + 1', - errors: [errorZeroFraction] - }, - { - code: 'foo(1.0 + 1)', - output: 'foo(1 + 1)', - errors: [errorZeroFraction] - }, - { - code: 'const foo = 1.00', - output: 'const foo = 1', - errors: [errorZeroFraction] - }, - { - code: 'const foo = 1.00000', - output: 'const foo = 1', - errors: [errorZeroFraction] - }, - { - code: 'const foo = -1.0', - output: 'const foo = -1', - errors: [errorZeroFraction] - }, - { - code: 'const foo = 123123123.0', - output: 'const foo = 123123123', - errors: [errorZeroFraction] - }, - { - code: 'const foo = 123.11100000000', - output: 'const foo = 123.111', - errors: [errorZeroFraction] - }, - { - code: 'const foo = 1.', - output: 'const foo = 1', - errors: [errorDanglingDot] - }, - { - code: 'const foo = +1.', - output: 'const foo = +1', - errors: [errorDanglingDot] - }, - { - code: 'const foo = -1.', - output: 'const foo = -1', - errors: [errorDanglingDot] - }, - { - code: 'const foo = 1.e10', - output: 'const foo = 1e10', - errors: [errorDanglingDot] - }, - { - code: 'const foo = +1.e-10', - output: 'const foo = +1e-10', - errors: [errorDanglingDot] - }, - { - code: 'const foo = -1.e+10', - output: 'const foo = -1e+10', - errors: [errorDanglingDot] - } - ] -}); - -test.snapshot({ - valid: [], invalid: [ 'const foo = 1.0', - 'const foo = (1.).toString()' + 'const foo = 1.0 + 1', + 'foo(1.0 + 1)', + 'const foo = 1.00', + 'const foo = 1.00000', + 'const foo = -1.0', + 'const foo = 123123123.0', + 'const foo = 123.11100000000', + 'const foo = 1.', + 'const foo = +1.', + 'const foo = -1.', + 'const foo = 1.e10', + 'const foo = +1.e-10', + 'const foo = -1.e+10', + 'const foo = (1.).toString()', + ...[ + '123_000.', + '123_000.0', + '123_000.000', + '123_000.000_000', + '123_000.123_000', + '123_000.000_400' + ] + .flatMap(number => [ + number, + `${number}e1`, + `${number}e+1`, + `${number}e-1`, + `${number}e0`, + `${number}e+0`, + `${number}e-0`, + `${number}e10`, + `${number}e+10`, + `${number}e-10`, + `${number}E-10`, + `${number}E-10_10` + ]) + .flatMap(number => [ + `+${number}`, + `-${number}` + ]) + .map(number => `${number};`), + '1.00.toFixed(2)', + '1.00 .toFixed(2)', + '(1.00).toFixed(2)', + '1.00?.toFixed(2)', + outdent` + console.log() + 1..toString() + `, + outdent` + console.log() + a[1.].toString() + `, + outdent` + console.log() + 1.00e10.toString() + `, + outdent` + console.log() + a[1.00e10].toString() + ` ] }); diff --git a/test/snapshots/no-zero-fractions.mjs.md b/test/snapshots/no-zero-fractions.mjs.md index dc65d2b38f..79583f4d6a 100644 --- a/test/snapshots/no-zero-fractions.mjs.md +++ b/test/snapshots/no-zero-fractions.mjs.md @@ -17,10 +17,218 @@ Generated by [AVA](https://avajs.dev). `␊ > 1 | const foo = 1.0␊ - | ^^^ Don't use a zero fraction in the number.␊ + | ^^ Don't use a zero fraction in the number.␊ ` ## Invalid #2 + 1 | const foo = 1.0 + 1 + +> Output + + `␊ + 1 | const foo = 1 + 1␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = 1.0 + 1␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #3 + 1 | foo(1.0 + 1) + +> Output + + `␊ + 1 | foo(1 + 1)␊ + ` + +> Error 1/1 + + `␊ + > 1 | foo(1.0 + 1)␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #4 + 1 | const foo = 1.00 + +> Output + + `␊ + 1 | const foo = 1␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = 1.00␊ + | ^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #5 + 1 | const foo = 1.00000 + +> Output + + `␊ + 1 | const foo = 1␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = 1.00000␊ + | ^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #6 + 1 | const foo = -1.0 + +> Output + + `␊ + 1 | const foo = -1␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = -1.0␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #7 + 1 | const foo = 123123123.0 + +> Output + + `␊ + 1 | const foo = 123123123␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = 123123123.0␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #8 + 1 | const foo = 123.11100000000 + +> Output + + `␊ + 1 | const foo = 123.111␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = 123.11100000000␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #9 + 1 | const foo = 1. + +> Output + + `␊ + 1 | const foo = 1␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = 1.␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #10 + 1 | const foo = +1. + +> Output + + `␊ + 1 | const foo = +1␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = +1.␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #11 + 1 | const foo = -1. + +> Output + + `␊ + 1 | const foo = -1␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = -1.␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #12 + 1 | const foo = 1.e10 + +> Output + + `␊ + 1 | const foo = 1e10␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = 1.e10␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #13 + 1 | const foo = +1.e-10 + +> Output + + `␊ + 1 | const foo = +1e-10␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = +1.e-10␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #14 + 1 | const foo = -1.e+10 + +> Output + + `␊ + 1 | const foo = -1e+10␊ + ` + +> Error 1/1 + + `␊ + > 1 | const foo = -1.e+10␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #15 1 | const foo = (1.).toString() > Output @@ -33,5 +241,2449 @@ Generated by [AVA](https://avajs.dev). `␊ > 1 | const foo = (1.).toString()␊ - | ^^ Don't use a dangling dot in the number.␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #16 + 1 | +123_000.; + +> Output + + `␊ + 1 | +123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #17 + 1 | -123_000.; + +> Output + + `␊ + 1 | -123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #18 + 1 | +123_000.e1; + +> Output + + `␊ + 1 | +123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e1;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #19 + 1 | -123_000.e1; + +> Output + + `␊ + 1 | -123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e1;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #20 + 1 | +123_000.e+1; + +> Output + + `␊ + 1 | +123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e+1;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #21 + 1 | -123_000.e+1; + +> Output + + `␊ + 1 | -123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e+1;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #22 + 1 | +123_000.e-1; + +> Output + + `␊ + 1 | +123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e-1;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #23 + 1 | -123_000.e-1; + +> Output + + `␊ + 1 | -123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e-1;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #24 + 1 | +123_000.e0; + +> Output + + `␊ + 1 | +123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e0;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #25 + 1 | -123_000.e0; + +> Output + + `␊ + 1 | -123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e0;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #26 + 1 | +123_000.e+0; + +> Output + + `␊ + 1 | +123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e+0;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #27 + 1 | -123_000.e+0; + +> Output + + `␊ + 1 | -123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e+0;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #28 + 1 | +123_000.e-0; + +> Output + + `␊ + 1 | +123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e-0;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #29 + 1 | -123_000.e-0; + +> Output + + `␊ + 1 | -123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e-0;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #30 + 1 | +123_000.e10; + +> Output + + `␊ + 1 | +123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #31 + 1 | -123_000.e10; + +> Output + + `␊ + 1 | -123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #32 + 1 | +123_000.e+10; + +> Output + + `␊ + 1 | +123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e+10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #33 + 1 | -123_000.e+10; + +> Output + + `␊ + 1 | -123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e+10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #34 + 1 | +123_000.e-10; + +> Output + + `␊ + 1 | +123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.e-10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #35 + 1 | -123_000.e-10; + +> Output + + `␊ + 1 | -123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.e-10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #36 + 1 | +123_000.E-10; + +> Output + + `␊ + 1 | +123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.E-10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #37 + 1 | -123_000.E-10; + +> Output + + `␊ + 1 | -123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.E-10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #38 + 1 | +123_000.E-10_10; + +> Output + + `␊ + 1 | +123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.E-10_10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #39 + 1 | -123_000.E-10_10; + +> Output + + `␊ + 1 | -123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.E-10_10;␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #40 + 1 | +123_000.0; + +> Output + + `␊ + 1 | +123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #41 + 1 | -123_000.0; + +> Output + + `␊ + 1 | -123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #42 + 1 | +123_000.0e1; + +> Output + + `␊ + 1 | +123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #43 + 1 | -123_000.0e1; + +> Output + + `␊ + 1 | -123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #44 + 1 | +123_000.0e+1; + +> Output + + `␊ + 1 | +123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e+1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #45 + 1 | -123_000.0e+1; + +> Output + + `␊ + 1 | -123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e+1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #46 + 1 | +123_000.0e-1; + +> Output + + `␊ + 1 | +123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e-1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #47 + 1 | -123_000.0e-1; + +> Output + + `␊ + 1 | -123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e-1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #48 + 1 | +123_000.0e0; + +> Output + + `␊ + 1 | +123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #49 + 1 | -123_000.0e0; + +> Output + + `␊ + 1 | -123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #50 + 1 | +123_000.0e+0; + +> Output + + `␊ + 1 | +123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e+0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #51 + 1 | -123_000.0e+0; + +> Output + + `␊ + 1 | -123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e+0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #52 + 1 | +123_000.0e-0; + +> Output + + `␊ + 1 | +123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e-0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #53 + 1 | -123_000.0e-0; + +> Output + + `␊ + 1 | -123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e-0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #54 + 1 | +123_000.0e10; + +> Output + + `␊ + 1 | +123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #55 + 1 | -123_000.0e10; + +> Output + + `␊ + 1 | -123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #56 + 1 | +123_000.0e+10; + +> Output + + `␊ + 1 | +123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e+10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #57 + 1 | -123_000.0e+10; + +> Output + + `␊ + 1 | -123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e+10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #58 + 1 | +123_000.0e-10; + +> Output + + `␊ + 1 | +123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0e-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #59 + 1 | -123_000.0e-10; + +> Output + + `␊ + 1 | -123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0e-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #60 + 1 | +123_000.0E-10; + +> Output + + `␊ + 1 | +123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0E-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #61 + 1 | -123_000.0E-10; + +> Output + + `␊ + 1 | -123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0E-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #62 + 1 | +123_000.0E-10_10; + +> Output + + `␊ + 1 | +123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.0E-10_10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #63 + 1 | -123_000.0E-10_10; + +> Output + + `␊ + 1 | -123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.0E-10_10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #64 + 1 | +123_000.000; + +> Output + + `␊ + 1 | +123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #65 + 1 | -123_000.000; + +> Output + + `␊ + 1 | -123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #66 + 1 | +123_000.000e1; + +> Output + + `␊ + 1 | +123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #67 + 1 | -123_000.000e1; + +> Output + + `␊ + 1 | -123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #68 + 1 | +123_000.000e+1; + +> Output + + `␊ + 1 | +123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e+1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #69 + 1 | -123_000.000e+1; + +> Output + + `␊ + 1 | -123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e+1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #70 + 1 | +123_000.000e-1; + +> Output + + `␊ + 1 | +123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e-1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #71 + 1 | -123_000.000e-1; + +> Output + + `␊ + 1 | -123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e-1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #72 + 1 | +123_000.000e0; + +> Output + + `␊ + 1 | +123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #73 + 1 | -123_000.000e0; + +> Output + + `␊ + 1 | -123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #74 + 1 | +123_000.000e+0; + +> Output + + `␊ + 1 | +123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e+0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #75 + 1 | -123_000.000e+0; + +> Output + + `␊ + 1 | -123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e+0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #76 + 1 | +123_000.000e-0; + +> Output + + `␊ + 1 | +123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e-0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #77 + 1 | -123_000.000e-0; + +> Output + + `␊ + 1 | -123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e-0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #78 + 1 | +123_000.000e10; + +> Output + + `␊ + 1 | +123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #79 + 1 | -123_000.000e10; + +> Output + + `␊ + 1 | -123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #80 + 1 | +123_000.000e+10; + +> Output + + `␊ + 1 | +123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e+10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #81 + 1 | -123_000.000e+10; + +> Output + + `␊ + 1 | -123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e+10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #82 + 1 | +123_000.000e-10; + +> Output + + `␊ + 1 | +123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000e-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #83 + 1 | -123_000.000e-10; + +> Output + + `␊ + 1 | -123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000e-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #84 + 1 | +123_000.000E-10; + +> Output + + `␊ + 1 | +123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000E-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #85 + 1 | -123_000.000E-10; + +> Output + + `␊ + 1 | -123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000E-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #86 + 1 | +123_000.000E-10_10; + +> Output + + `␊ + 1 | +123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000E-10_10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #87 + 1 | -123_000.000E-10_10; + +> Output + + `␊ + 1 | -123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000E-10_10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #88 + 1 | +123_000.000_000; + +> Output + + `␊ + 1 | +123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #89 + 1 | -123_000.000_000; + +> Output + + `␊ + 1 | -123_000;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #90 + 1 | +123_000.000_000e1; + +> Output + + `␊ + 1 | +123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e1;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #91 + 1 | -123_000.000_000e1; + +> Output + + `␊ + 1 | -123_000e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e1;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #92 + 1 | +123_000.000_000e+1; + +> Output + + `␊ + 1 | +123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e+1;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #93 + 1 | -123_000.000_000e+1; + +> Output + + `␊ + 1 | -123_000e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e+1;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #94 + 1 | +123_000.000_000e-1; + +> Output + + `␊ + 1 | +123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e-1;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #95 + 1 | -123_000.000_000e-1; + +> Output + + `␊ + 1 | -123_000e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e-1;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #96 + 1 | +123_000.000_000e0; + +> Output + + `␊ + 1 | +123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e0;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #97 + 1 | -123_000.000_000e0; + +> Output + + `␊ + 1 | -123_000e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e0;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #98 + 1 | +123_000.000_000e+0; + +> Output + + `␊ + 1 | +123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e+0;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #99 + 1 | -123_000.000_000e+0; + +> Output + + `␊ + 1 | -123_000e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e+0;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #100 + 1 | +123_000.000_000e-0; + +> Output + + `␊ + 1 | +123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e-0;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #101 + 1 | -123_000.000_000e-0; + +> Output + + `␊ + 1 | -123_000e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e-0;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #102 + 1 | +123_000.000_000e10; + +> Output + + `␊ + 1 | +123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #103 + 1 | -123_000.000_000e10; + +> Output + + `␊ + 1 | -123_000e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #104 + 1 | +123_000.000_000e+10; + +> Output + + `␊ + 1 | +123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e+10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #105 + 1 | -123_000.000_000e+10; + +> Output + + `␊ + 1 | -123_000e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e+10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #106 + 1 | +123_000.000_000e-10; + +> Output + + `␊ + 1 | +123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000e-10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #107 + 1 | -123_000.000_000e-10; + +> Output + + `␊ + 1 | -123_000e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000e-10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #108 + 1 | +123_000.000_000E-10; + +> Output + + `␊ + 1 | +123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000E-10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #109 + 1 | -123_000.000_000E-10; + +> Output + + `␊ + 1 | -123_000E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000E-10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #110 + 1 | +123_000.000_000E-10_10; + +> Output + + `␊ + 1 | +123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_000E-10_10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #111 + 1 | -123_000.000_000E-10_10; + +> Output + + `␊ + 1 | -123_000E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_000E-10_10;␊ + | ^^^^^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #112 + 1 | +123_000.123_000; + +> Output + + `␊ + 1 | +123_000.123;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #113 + 1 | -123_000.123_000; + +> Output + + `␊ + 1 | -123_000.123;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #114 + 1 | +123_000.123_000e1; + +> Output + + `␊ + 1 | +123_000.123e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #115 + 1 | -123_000.123_000e1; + +> Output + + `␊ + 1 | -123_000.123e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #116 + 1 | +123_000.123_000e+1; + +> Output + + `␊ + 1 | +123_000.123e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e+1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #117 + 1 | -123_000.123_000e+1; + +> Output + + `␊ + 1 | -123_000.123e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e+1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #118 + 1 | +123_000.123_000e-1; + +> Output + + `␊ + 1 | +123_000.123e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e-1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #119 + 1 | -123_000.123_000e-1; + +> Output + + `␊ + 1 | -123_000.123e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e-1;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #120 + 1 | +123_000.123_000e0; + +> Output + + `␊ + 1 | +123_000.123e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #121 + 1 | -123_000.123_000e0; + +> Output + + `␊ + 1 | -123_000.123e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #122 + 1 | +123_000.123_000e+0; + +> Output + + `␊ + 1 | +123_000.123e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e+0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #123 + 1 | -123_000.123_000e+0; + +> Output + + `␊ + 1 | -123_000.123e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e+0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #124 + 1 | +123_000.123_000e-0; + +> Output + + `␊ + 1 | +123_000.123e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e-0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #125 + 1 | -123_000.123_000e-0; + +> Output + + `␊ + 1 | -123_000.123e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e-0;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #126 + 1 | +123_000.123_000e10; + +> Output + + `␊ + 1 | +123_000.123e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #127 + 1 | -123_000.123_000e10; + +> Output + + `␊ + 1 | -123_000.123e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #128 + 1 | +123_000.123_000e+10; + +> Output + + `␊ + 1 | +123_000.123e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e+10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #129 + 1 | -123_000.123_000e+10; + +> Output + + `␊ + 1 | -123_000.123e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e+10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #130 + 1 | +123_000.123_000e-10; + +> Output + + `␊ + 1 | +123_000.123e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000e-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #131 + 1 | -123_000.123_000e-10; + +> Output + + `␊ + 1 | -123_000.123e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000e-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #132 + 1 | +123_000.123_000E-10; + +> Output + + `␊ + 1 | +123_000.123E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000E-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #133 + 1 | -123_000.123_000E-10; + +> Output + + `␊ + 1 | -123_000.123E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000E-10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #134 + 1 | +123_000.123_000E-10_10; + +> Output + + `␊ + 1 | +123_000.123E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.123_000E-10_10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #135 + 1 | -123_000.123_000E-10_10; + +> Output + + `␊ + 1 | -123_000.123E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.123_000E-10_10;␊ + | ^^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #136 + 1 | +123_000.000_400; + +> Output + + `␊ + 1 | +123_000.000_4;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #137 + 1 | -123_000.000_400; + +> Output + + `␊ + 1 | -123_000.000_4;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #138 + 1 | +123_000.000_400e1; + +> Output + + `␊ + 1 | +123_000.000_4e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #139 + 1 | -123_000.000_400e1; + +> Output + + `␊ + 1 | -123_000.000_4e1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #140 + 1 | +123_000.000_400e+1; + +> Output + + `␊ + 1 | +123_000.000_4e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e+1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #141 + 1 | -123_000.000_400e+1; + +> Output + + `␊ + 1 | -123_000.000_4e+1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e+1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #142 + 1 | +123_000.000_400e-1; + +> Output + + `␊ + 1 | +123_000.000_4e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e-1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #143 + 1 | -123_000.000_400e-1; + +> Output + + `␊ + 1 | -123_000.000_4e-1;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e-1;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #144 + 1 | +123_000.000_400e0; + +> Output + + `␊ + 1 | +123_000.000_4e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #145 + 1 | -123_000.000_400e0; + +> Output + + `␊ + 1 | -123_000.000_4e0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #146 + 1 | +123_000.000_400e+0; + +> Output + + `␊ + 1 | +123_000.000_4e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e+0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #147 + 1 | -123_000.000_400e+0; + +> Output + + `␊ + 1 | -123_000.000_4e+0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e+0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #148 + 1 | +123_000.000_400e-0; + +> Output + + `␊ + 1 | +123_000.000_4e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e-0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #149 + 1 | -123_000.000_400e-0; + +> Output + + `␊ + 1 | -123_000.000_4e-0;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e-0;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #150 + 1 | +123_000.000_400e10; + +> Output + + `␊ + 1 | +123_000.000_4e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #151 + 1 | -123_000.000_400e10; + +> Output + + `␊ + 1 | -123_000.000_4e10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #152 + 1 | +123_000.000_400e+10; + +> Output + + `␊ + 1 | +123_000.000_4e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e+10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #153 + 1 | -123_000.000_400e+10; + +> Output + + `␊ + 1 | -123_000.000_4e+10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e+10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #154 + 1 | +123_000.000_400e-10; + +> Output + + `␊ + 1 | +123_000.000_4e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400e-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #155 + 1 | -123_000.000_400e-10; + +> Output + + `␊ + 1 | -123_000.000_4e-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400e-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #156 + 1 | +123_000.000_400E-10; + +> Output + + `␊ + 1 | +123_000.000_4E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400E-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #157 + 1 | -123_000.000_400E-10; + +> Output + + `␊ + 1 | -123_000.000_4E-10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400E-10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #158 + 1 | +123_000.000_400E-10_10; + +> Output + + `␊ + 1 | +123_000.000_4E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | +123_000.000_400E-10_10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #159 + 1 | -123_000.000_400E-10_10; + +> Output + + `␊ + 1 | -123_000.000_4E-10_10;␊ + ` + +> Error 1/1 + + `␊ + > 1 | -123_000.000_400E-10_10;␊ + | ^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #160 + 1 | 1.00.toFixed(2) + +> Output + + `␊ + 1 | (1).toFixed(2)␊ + ` + +> Error 1/1 + + `␊ + > 1 | 1.00.toFixed(2)␊ + | ^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #161 + 1 | 1.00 .toFixed(2) + +> Output + + `␊ + 1 | (1) .toFixed(2)␊ + ` + +> Error 1/1 + + `␊ + > 1 | 1.00 .toFixed(2)␊ + | ^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #162 + 1 | (1.00).toFixed(2) + +> Output + + `␊ + 1 | (1).toFixed(2)␊ + ` + +> Error 1/1 + + `␊ + > 1 | (1.00).toFixed(2)␊ + | ^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #163 + 1 | 1.00?.toFixed(2) + +> Output + + `␊ + 1 | (1)?.toFixed(2)␊ + ` + +> Error 1/1 + + `␊ + > 1 | 1.00?.toFixed(2)␊ + | ^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #164 + 1 | console.log() + 2 | 1..toString() + +> Output + + `␊ + 1 | console.log()␊ + 2 | ;(1).toString()␊ + ` + +> Error 1/1 + + `␊ + 1 | console.log()␊ + > 2 | 1..toString()␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #165 + 1 | console.log() + 2 | a[1.].toString() + +> Output + + `␊ + 1 | console.log()␊ + 2 | a[1].toString()␊ + ` + +> Error 1/1 + + `␊ + 1 | console.log()␊ + > 2 | a[1.].toString()␊ + | ^ Don't use a dangling dot in the number.␊ + ` + +## Invalid #166 + 1 | console.log() + 2 | 1.00e10.toString() + +> Output + + `␊ + 1 | console.log()␊ + 2 | 1e10.toString()␊ + ` + +> Error 1/1 + + `␊ + 1 | console.log()␊ + > 2 | 1.00e10.toString()␊ + | ^^^ Don't use a zero fraction in the number.␊ + ` + +## Invalid #167 + 1 | console.log() + 2 | a[1.00e10].toString() + +> Output + + `␊ + 1 | console.log()␊ + 2 | a[1e10].toString()␊ + ` + +> Error 1/1 + + `␊ + 1 | console.log()␊ + > 2 | a[1.00e10].toString()␊ + | ^^^ Don't use a zero fraction in the number.␊ ` diff --git a/test/snapshots/no-zero-fractions.mjs.snap b/test/snapshots/no-zero-fractions.mjs.snap index ca83dd3dd3..a33da6eed8 100644 Binary files a/test/snapshots/no-zero-fractions.mjs.snap and b/test/snapshots/no-zero-fractions.mjs.snap differ