cancel
Showing results for 
Search instead for 
Did you mean: 

Template Literals: Parsing error: Unexpected character '`' [ESLINT: ()]

EkanshCapgemini
Active Contributor
0 Kudos

Hello All,

I am getting ESLINT error for using back tick character in order to use the template literals in a js file. Could you please help in getting rid of that?

return `${description} (${id})`;

Accepted Solutions (1)

Accepted Solutions (1)

yuval_morad
Employee
Employee
go to project settings-> code checking->java script

open validation configuration and go to env tag ,

add "es6":true,

save

EkanshCapgemini
Active Contributor
0 Kudos

Worked like a charm. Thanks.

Answers (1)

Answers (1)

EkanshCapgemini
Active Contributor
0 Kudos

Hi yuval.morad ,

I reopened the thread as I am getting build error due to es6 syntax and I hope that you would probably have an answer to this.

Running "openui5_preload:preloadTmp" (openui5_preload) task>> Failed to compress dist/tmp/controller/Forecast.controller.js. This might be due to a syntax error in the file.Warning: Unexpected character '`'� Use --force to continue.

Aborted due to warnings.[INFO] Build finished in 19 seconds

Could you please help me in this?

Br, Ekansh