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

async functions - where do I use 'esversion: 8'? #145

Open
therckenrath opened this issue Apr 4, 2022 · 3 comments
Open

async functions - where do I use 'esversion: 8'? #145

therckenrath opened this issue Apr 4, 2022 · 3 comments
Labels

Comments

@therckenrath
Copy link

I'm trying to create an async function inside a behavior and I get the following message:

"async functions" is only available is ES8 (use 'esversion: 8').

I tried to add it to the behavior declaration in the model, however the message is still displayed, suggesting I didn't add it in the correct place.

Where do I add this?

@ecarriou
Copy link
Member

ecarriou commented Apr 4, 2022

You are talking about this hint ?

Capture d’écran 2022-04-04 à 22 07 24

If you want you can disable it by adding some comment lines like this:

function start() { 

  /* jshint ignore:start */
  async function test() {
  
  }
  /* jshint ignore:end */
  
  test();
}

I will have a look to update the hint to be compliant with the last version of JavaScript.

Anyway this hint will not block you for saving the behavior.

@therckenrath
Copy link
Author

therckenrath commented Apr 4, 2022 via email

@ecarriou
Copy link
Member

ecarriou commented Apr 4, 2022

You are welcome.

I made a commit (see 24613b7) to update JSHint options in order to be compliant with the latest version of JavaScript.

Expect to have it in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants