Skip to content

JavaScript syntax error with numeric separator #3543

@michaelts1

Description

@michaelts1

What happened?

I ran Add-ons Linter from the command line, and got a validation error:

There is a JavaScript syntax error in your code; validation cannot continue on this file.

Which points to this line of code, at column 14:
let tmp = 10_000.
It seems that the error is caused by the numeric separator.

What did you expect to happen?

I expect that Add-ons Linter will not throw any errors, since the use of numeric separators is described on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Numeric_separators, and is supported since Firefox 70, which was released more than a year ago.

Metadata

Metadata

Assignees

Labels

priority:p3type:syntaxIssues related to JavaScript syntax (support).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions