| How do I change the javascript version [message #1840872] |
Tue, 27 April 2021 12:58  |
Eclipse User |
|
|
|
The image shows I have some lines like
var com = com ?? {};
com.kable = com.kable ?? {};
com.kable.web = com.kable.web ?? {};
I have "JavaScript Problems" on these lines "Multiple markers at this line - primary expression expected -':' expected"
But from what I know, this is valid code and shouldn't be generating errors. It executes well when I deploy it and run it. So I am thinking that it is the javascript version in eclipse that is flagging these. I can't figure out how to change the javascript version. When I pull up the Project->Properties->Project Facets, I see JavaScript is at version 1. When I right click on it, I can unlock it but I can't change the version, even if I unlock it.
|
|
|
|
| Re: How do I change the javascript version [message #1842079 is a reply to message #1840872] |
Tue, 08 June 2021 12:26   |
Eclipse User |
|
|
|
Version: 2021-03 (4.19.0)
Build id: 20210312-0638
Some of these are shown only in the editor panel, others are shown in the markers view. In the Markers view they are showing up as type "JavaScript" problem.
Here is the shortest file I have that shows the problem.
01 var com = com ?? {};
02 com.kable = com.kable ?? {};
03 com.kable.web = com.kable.web ?? {};
04 com.kable.web.hub = com.kable.web.hub ?? {};
05
06 com.kable.web.hub.resize = com.kable.web.hub.resize ?? {};
07
08 function openModal(modalIdNoHash) {
09 $(`#${modalIdNoHash}`).addClass("active");
10 $("#overlay").addClass("active");
11 }
12
13 function closeModal(modalIdNoHash) {
14 $(`#${modalIdNoHash}`).removeClass("active");
15 $("#overlay").removeClass("active");
16 }
17
18
The editor pane has the following markers
01 Multiple markers at this line
- ':' expected
- primary expression expected
02 Multiple markers at this line
- ':' expected
- primary expression expected
03 Multiple markers at this line
- ':' expected
- primary expression expected
05 Multiple markers at this line
- primary expression expected
- ':' expected
08 ',' expected
13 Multiple markers at this line
- Unterminated template literal
- ',' expected
17 Multiple markers at this line
- ',' expected
- '}' expected
- ')' expected
The Markers view has the following
Description Resource Path Location Type
',' expected hub.js /hub/src/main/webapp/resources/js line 8 JavaScript Problem
',' expected hub.js /hub/src/main/webapp/resources/js line 13 JavaScript Problem
',' expected hub.js /hub/src/main/webapp/resources/js line 13 JavaScript Problem
',' expected hub.js /hub/src/main/webapp/resources/js line 13 JavaScript Problem
',' expected hub.js /hub/src/main/webapp/resources/js line 17 JavaScript Problem
|
|
|
|
Powered by
FUDForum. Page generated in 0.07574 seconds