Skip to content

Using underscores to make numbers more visible produces red underscores with the linter #3709

@SafeyX3

Description

@SafeyX3

p5.js version

2.0.5

What is your operating system?

iOS

Web browser and version

Safari 18.7.1

Actual Behavior

Using underscores to make numbers more visible produces red underscores from the linter, even though it doesn’t actually error and is supported in js. (Example, 5_000_000 instead of 5000000)

Image

Expected Behavior

I was expecting it to not have the red underscores, and for the linter to understand it.

Steps to reproduce

Steps:

  1. Try to use underscores between numbers in a number

Snippet:

// Is fine with the linter
console.log(5000000)
// Warns from the linter
console.log(5_000_000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions