Skip to content
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 check reports error, but there is no syntax error in the code #3009

Closed
A9T9 opened this issue Jan 16, 2020 · 2 comments
Closed

Comments

@A9T9
Copy link

A9T9 commented Jan 16, 2020

Describe the problem and steps to reproduce it:

I tried to upload a new addon, but the syntax check reports an error.

How to recreate:

  1. Upload this extension:
    Firefox_Opera.a6.zip

  2. You will get this error

JavaScript syntax error
Error: There is a JavaScript syntax error in your code; validation cannot continue on this file.
scripts/background.js line 31 column 13

but line 31 looks ok:
changeIcon = (tabId,url) => {

What happened?

s1

Details:
a6

What did you expect to happen?

No syntax error

Anything else we should know?

Extension home page: ColorFish Color Picker

When tested, the addon works fine in Firefox.

@A9T9 A9T9 changed the title JavaScript syntax error reported (but there is no syntax error in the code) JavaScript syntax check "false alarm" (there is no syntax error in the code) Jan 16, 2020
@A9T9 A9T9 changed the title JavaScript syntax check "false alarm" (there is no syntax error in the code) JavaScript syntax reports error, but there is no syntax error in the code Jan 16, 2020
@A9T9 A9T9 changed the title JavaScript syntax reports error, but there is no syntax error in the code JavaScript syntax checks reports error, but there is no syntax error in the code Jan 16, 2020
@A9T9 A9T9 changed the title JavaScript syntax checks reports error, but there is no syntax error in the code JavaScript syntax check reports error, but there is no syntax error in the code Jan 16, 2020
@A9T9
Copy link
Author

A9T9 commented Jan 16, 2020

It seems the error is related to the new javascript syntax(es6)?

We changed
changeIcon = (tabId,url) => {
to
changeIcon(tabId,url) {
and the submission worked fine.

@Rob--W
Copy link
Member

Rob--W commented May 5, 2020

Duplicate of #2978

@Rob--W Rob--W marked this as a duplicate of #2978 May 5, 2020
@Rob--W Rob--W closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants