-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript syntax error with numeric separator #3543
Comments
Which version of We rely on We are currently using eslint 7.17.0 - Line 54 in a8ec9db
|
Running I created a folder containing only one file that contains only the following line:
|
I see the reason... We're specifying To fix this, we need to change 2020 to 2021 at addons-linter/src/scanners/javascript.js Line 13 in be94690
and add a unit test (to verify that we support numeric separators) in https://github.com/mozilla/addons-linter/blob/be94690d29118a0f3c642b2803148a2699b69d67/tests/unit/scanners/test.javascript.js Are you interested in contributing a patch? |
I created a pull request to fix this issue. |
thanks @michaelts1! |
What happened?
I ran Add-ons Linter from the command line, and got a validation error:
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.
The text was updated successfully, but these errors were encountered: