Skip to content

linter: possible typo in no-loss-of-precision code examples #566

@TheDanikReal

Description

@TheDanikReal

Hi! I found that in correct code examples section of https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-loss-of-precision.html there are couple of typos

var x = 123.0000000000000000000000";
var x = 12345";

These examples are not valid, while running code you get this error

SyntaxError: "" string literal contains an unescaped line break

Maybe they're meant for these to be bigints (123n, for example) or strings
Original eslint documentation doesn't have similar examples https://eslint.org/docs/latest/rules/no-loss-of-precision

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions